This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- How to launch a bat file from custom action w/param from Progarm Files dir?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 17, 2014
04:23 PM
How to launch a bat file from custom action w/param from Progarm Files dir?
Hi All;
I am having a little trouble. I have a custom action that launches a .bat file that I have been using for awhile in my installer. It has been running very well but I have been placing it in the TEMP folder. I now want to move it to our installation folder. The problem is I can't seem to get the quoting right for it. I am using the following to launch it.
C:\windows\system32\cmd.exe /k '"[INSTALLDIR]installConfigSyslogMan.bat" INSTALL'
The installdir equates to "C:\Program Files\Blah blah\". when I run the custom action I get this "The filename, directory name, or volume label syntax is incorrect." I have tried using the escape character and it tells me the same thing.
C:\windows\system32\cmd.exe /k "\"[INSTALLDIR]installConfigSyslogMan.bat\" INSTALL"
Any ideas?
I am having a little trouble. I have a custom action that launches a .bat file that I have been using for awhile in my installer. It has been running very well but I have been placing it in the TEMP folder. I now want to move it to our installation folder. The problem is I can't seem to get the quoting right for it. I am using the following to launch it.
C:\windows\system32\cmd.exe /k '"[INSTALLDIR]installConfigSyslogMan.bat" INSTALL'
The installdir equates to "C:\Program Files\Blah blah\". when I run the custom action I get this "The filename, directory name, or volume label syntax is incorrect." I have tried using the escape character and it tells me the same thing.
C:\windows\system32\cmd.exe /k "\"[INSTALLDIR]installConfigSyslogMan.bat\" INSTALL"
Any ideas?
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 25, 2014
05:12 AM
Can you not create a self-extracting exe (extracts to %temp% or another folder) (if security is an issue) that runs silently, and use that instead of the batch file as part of your custom action?
(7-zip, WinZip etc. can be used) (WinRAR is my favourite)
(7-zip, WinZip etc. can be used) (WinRAR is my favourite)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 19, 2014
02:30 PM
Hi,
Batch files can use environment variables. Try referencing %programfiles% in the batch file.
Recognized Environment Variables
http://technet.microsoft.com/en-us/library/dd560744%28v=ws.10%29.aspx
Grant
Batch files can use environment variables. Try referencing %programfiles% in the batch file.
Recognized Environment Variables
http://technet.microsoft.com/en-us/library/dd560744%28v=ws.10%29.aspx
Grant