cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
nileshrathodn
Level 6

cmd prompt instead of command prompt

Hi all,

When we use "Execute Scrip/Batch" file option under "general" actions It runs the script in "command" prompt ant not "cmd" prompt. My need is to run the script in "cmd" prompt.

Can anybody help me doing that??

In that script I need to got say "c:\abc def\xyz" location(mark space in the location) so I use cd c:\abc def\xyz or cd "c:\abc def\xyz" but it doesn't work.

Can you help please????

Thanks in advance,
Nilesh Rathod.
Labels (1)
0 Kudos
(8) Replies
pv7721
Level 20

cmd.exe is the command line interpreter on OS/2, Windows CE and on Windows NT-based operating systems (including Windows 2000, XP, Vista, Server 2003 and Server 2008). It is the analog of COMMAND.COM in MS-DOS and Windows 9x systems, or of the Unix shells used on Unix-like systems.


So if your installer is running in Windows 9x environments, then I guess the 1st part is normal.

Actually, when IA is invoking a batch, it's doing that by the means of invoking Java so for internal commands like CD you actually need to invoke the command-line interpreter like this:

CMD /C CD "C:\ABC DEF\XYZ"
(note the quotes).
0 Kudos
nileshrathodn
Level 6

pv7721 wrote:
So if your installer is running in Windows 9x environments, then I guess the 1st part is normal.

Actually, when IA is invoking a batch, it's doing that by the means of invoking Java so for internal commands like CD you actually need to invoke the command-line interpreter like this:

CMD /C CD "C:\ABC DEF\XYZ"
(note the quotes).


Actually if space is not ther in path(say path is "c:\nil") you can run script at there by command "cd /d c:\nil\scriptname.bat" in execute script/batch file.
i tried cmd /C ..... but that's too not working

Thanks & Regards,
Nilesh Rathod.
0 Kudos
pv7721
Level 20

nileshrathodn wrote:
Actually if space is not ther in path(say path is "c:\nil") you can run script at there by command "cd /d c:\nil\scriptname.bat" in execute script/batch file.
i tried cmd /C ..... but that's too not working

Thanks & Regards,
Nilesh Rathod.


I'm sorry, but for me cd /d c:\nil\scriptname.bat doesn't make too much sense as CD is, after all, change directory, so you cannot change directory to a file!...
0 Kudos
nileshrathodn
Level 6

pv7721 wrote:
I'm sorry, but for me cd /d c:\nil\scriptname.bat doesn't make too much sense as CD is, after all, change directory, so you cannot change directory to a file!...


oh...

I mean cd /d c:\nil (then press enter) then scripname.bat (press enter). You can run your script this way too... I mean no need to write CMD /C cd...........

Anyway the main issue is run file in "c:\Program Files\scripname.bat" for example.........

Thanks & Regards,
Nilesh Rathod.
0 Kudos
pv7721
Level 20

I would try this if I were you: Execute the following command:

CMD /C CALL "C:\Program Files\Nil\script.bat"


(you call directly the script, no need to CD & execute)
0 Kudos
nileshrathodn
Level 6

pv7721 wrote:
I would try this if I were you: Execute the following command:

CMD /C CALL "C:\Program Files\Nil\script.bat"


(you call directly the script, no need to CD & execute)



It worked!!!!! Great!!!!!!!.........

Thank you........................

But now I am getting Error : Exception in "main" thread : and
Don't know whether it's due to my script or what.......
Anyway I will work on it and give you some new problems 🙂

Thanks & Regards,
Nilesh Rathod.
0 Kudos
pv7721
Level 20

Maybe you need to open a new thread for that because it's a new problem. And when you do you might need to post the full error, and maybe also the script and the .iap_xml file.
0 Kudos
ChandanOmkar
Level 8

i think, you should use double slash in place of single.
e.g.
CMD /C CALL "C:\\Program Files\\Nil\\script.bat"
0 Kudos