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
- :
- Thanks!
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
‎Apr 17, 2015
07:07 AM
Run a batch file present in file table from custom action.
I am trying to run a command that enables protocols of the web service i have hosted. for this i had created a batch file and made an entry into file table.
Either i am making an entry in the wrong way or else i am using it in the wrong way
please help
The target for custom action is as follows
cmd.exe /c ""
enableProtocols is the name of the file column in file table
Either i am making an entry in the wrong way or else i am using it in the wrong way
please help
The target for custom action is as follows
cmd.exe /c "
enableProtocols is the name of the file column in file table
(6) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 18, 2015
05:40 PM
Arshbeer Singh wrote:
I am trying to run a command that enables protocols of the web service i have hosted. for this i had created a batch file and made an entry into file table.
Either i am making an entry in the wrong way or else i am using it in the wrong way
please help
The target for custom action is as follows
cmd.exe /c ""
enableProtocols is the name of the file column in file table
MSI expects the entry to look like [#enableProtocols] (or whatever the name is that is listed in the File column of the File table). Your use of angle brackets is something more often seen in InstallScript.
There are other important things to consider as well, such as making sure that you're not calling the custom action until after the file has actually been installed (sequence it after the InstallFiles action). Also be sure to call it in Deferred Mode.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 20, 2015
12:46 AM
Thanks Evan!
I did everything as u said. I have set the deferred execution and now the target looks like
cmd.exe /c "[#enableProtocols]"
I have kept it after installfiles (infact just before installfinalize so that the web service is also hosted)in the sequence but still no luck!
There must be a basic thing I am missing but I am not able to figure out what it actually is
Please Help!
P.S : What the action does is enable the net.Tcp protocol on the web service I have installed and the batch file is working fine as if i run it explicitly it does the job required.
I did everything as u said. I have set the deferred execution and now the target looks like
cmd.exe /c "[#enableProtocols]"
I have kept it after installfiles (infact just before installfinalize so that the web service is also hosted)in the sequence but still no luck!
There must be a basic thing I am missing but I am not able to figure out what it actually is
Please Help!
P.S : What the action does is enable the net.Tcp protocol on the web service I have installed and the batch file is working fine as if i run it explicitly it does the job required.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 20, 2015
04:37 AM
Problem Solved!
Well I am embarresed to say that after following your instructions the reason it wasnt working was I had no mentioned the file extension in file table column!
But running a file this way creates the file in my installation directory. Is there a way to run the batch file without the file being copied in the install directory like kept in temperory memory or something?
Thanks once again 🙂
Well I am embarresed to say that after following your instructions the reason it wasnt working was I had no mentioned the file extension in file table column!
But running a file this way creates the file in my installation directory. Is there a way to run the batch file without the file being copied in the install directory like kept in temperory memory or something?
Thanks once again 🙂
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 20, 2015
05:00 AM
You can probably try the "Support Files" view. The files in here aren't installed but are available during the install.
These can be accessed via SUPPORTDIR public property in immediate mode.
These can be accessed via SUPPORTDIR public property in immediate mode.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 20, 2015
02:35 PM
rrinblue22 wrote:
You can probably try the "Support Files" view. The files in here aren't installed but are available during the install.
These can be accessed via SUPPORTDIR public property in immediate mode.
I agree, use the Support Files/Billboards view. Highlight Language Independent and add your custom action file. Then update your custom action to look something like this: cmd.exe /c "[SUPPORTDIR]enableProtocols.cmd"
By using the Support Files\Billboards view, the file will only briefly exist under the %TEMP% folder (in a GUID subfolder) and will be automatically deleted at the end of the install.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 21, 2015
09:15 AM
Mission Accomplished people! Loads of thanks!