Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

How to run *.bat file?


4 replies to this topic

Heberto

Heberto
  • Members
  • 1 posts

Posted 04 February 2002 - 21:45

Hi to all Developers,

I am currently using IS ver. 6.30 and I would like to know how I can run *.bat files in my installation project?.

I try this but it is not working:

szLaunchApp = "Command.com";
szCmdLine = "T:\mybatfile.bat";

I will appreciate any suggestion.

Thanks.




Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 05 February 2002 - 00:37

By the looks of things, I'm assuming you're using LaunchApp to do this.  I'm also assuming that you tried referencing the batch file directly.

Come to think of it though, if you get this figured out, I could use it in my setup as well.


Perotin

Perotin
  • Full Members
  • 407 posts

Posted 05 February 2002 - 16:15

if I use "command.com whatever.bat" all I get is
Specified COMMAND search directory bad
Microsoft® Windows NT DOS
©Copyright Microsoft Corp 1990-1996.

So if you tried to run the batch file directly and it didn't work, can you tell us, what return code LaunchAppAndWait or LaunchApp returned?

monr8

monr8
  • Members
  • 3 posts

Posted 09 February 2002 - 14:30

Try this

LaunchAppAndWait("cmd.exe", "/c <path to your batchfile>", WAIT)

use cmd.exe for NT/2000 and command.com for Win 95/98/Me


MKaiser

MKaiser
  • Full Members
  • 88 posts

Posted 11 February 2002 - 10:03

erm...why don't you just use

LaunchAppAndWait("Your batch file here",...) ? This is much easier than determining which OS for specifying cmd.exe or command.com...

Ok some people might like the difficult approaches instead of the easy ones...

Marko