/build/static/layout/Breadcrumb_cap_w.png

launching a batch file with Wise

hi guys,
This is really bugging me. All i want to do is create an msi which copies a batch file to the destination pc and then execute it. I have read the other posts relating to this and cant get mine to work here. I am reasonably proficient with Wise 7 and have always had a problem with batch files. this is my CA, its in Execute deffered

Patch files
If NOT Installed then
Execute Program From Destination cmd.exe c:\windows\system32\file.bat Default Directory Windows\System32(Action)
End
Duplicate files
(using Installation expert i have obviously set the file.bat to be copied to c:\windows\system32)
The resultant test opens a cmd window with no path or cmd in it, a bit like when you open cmd. And thats it nothing more happens. what have i missed?
thanx.

0 Comments   [ + ] Show comments

Answers (4)

Posted by: timmsie 15 years ago
Fourth Degree Brown Belt
0
try adding the /c switch to the command line i.e something like

cmd /c start /min [SystemFolder]file.bat

On another note though why are you using a batch file in the first place?
Posted by: chris16v 15 years ago
Senior Yellow Belt
0
yeah, i have been playing with the switches, i will try them again and check the syntax/spacing is correct. When you are rushing, mistakes can happen.
I need to use this batch file because i am charged only with packaging the company requests, i just need to find a way.
is the /c switch with cmd.exe the most prefered method of executing batch files or is there another quick/easy method?

thanks.
Posted by: anonymous_9363 15 years ago
Red Belt
0
Without that switch, you're command line simply instructs the OS to open a command prompt and keep it open. With it, it instructs it to open it, process the arguments following, then exit. If you wanted to open it, process the arguments following, thenstill remain open, you'd use '/K' instead.

As with most DOS commands, adding '/?' or '/help' will display all the available options. Of course, being DOS, the help isn't always terribly helpful, unless you've spent any time with DOS.
Posted by: chris16v 15 years ago
Senior Yellow Belt
0
yep, the /c switch does work. Thanks guys. All in all it was simple but thats with anything until you know it- i guess.

thanks for all your help.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ