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)
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?
0 Comments   [ + ] Show Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.


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?
Answered 12/22/2008 by: timmsie
Fourth Degree Brown Belt

Please log in to comment
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?

Answered 12/22/2008 by: chris16v
Senior Yellow Belt

Please log in to comment
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.
Answered 12/22/2008 by: VBScab
Red Belt

Please log in to comment
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.
Answered 12/22/2008 by: chris16v
Senior Yellow Belt

Please log in to comment
Answer this question or Comment on this question for clarity