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.
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)
Please log in to answer
Posted by:
timmsie
15 years ago
Posted by:
chris16v
15 years ago
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.
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
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.
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
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.