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
- :
- Re: EXE Custom Action calling cmd.exe
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 13, 2009
04:57 AM
EXE Custom Action calling cmd.exe
Hi!
I have a problem. I have a custom action that I want to run silenty but I am not able to find a way to do that.
cmd.exe /c "[VS2008DIR][VSEXE]"/command Tools.InstallCommunityControls
As you can see, a call on cmd.exe to run a nother exe where [VS2008DIR] is the path and [VSEXE] is the name of the exe file. The rest is the command line.
I am picking up the propertys in the appsearch so this is not included in my package so I don´t know where they are on the destination system.
What happened is that the cmd.exe lanches a command prompt and opens the exe file and then closes when the command is finished. I want that to run silently..
Any thoughts?
I have a problem. I have a custom action that I want to run silenty but I am not able to find a way to do that.
cmd.exe /c "[VS2008DIR][VSEXE]"/command Tools.InstallCommunityControls
As you can see, a call on cmd.exe to run a nother exe where [VS2008DIR] is the path and [VSEXE] is the name of the exe file. The rest is the command line.
I am picking up the propertys in the appsearch so this is not included in my package so I don´t know where they are on the destination system.
What happened is that the cmd.exe lanches a command prompt and opens the exe file and then closes when the command is finished. I want that to run silently..
Any thoughts?
(8) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 15, 2009
08:53 PM
u don't need to execute the cmd.exe
if u create "new exe" custom action, installshield will launch the shell for u.
in your case, firstly, u need to create a property whose value is your exe file's lacation, then use the "new exe"->"path in property value" create a custom action.
I'm not sure whether this is a the answer u want
if u create "new exe" custom action, installshield will launch the shell for u.
in your case, firstly, u need to create a property whose value is your exe file's lacation, then use the "new exe"->"path in property value" create a custom action.
I'm not sure whether this is a the answer u want
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 15, 2009
11:27 PM
The thing is that I dont know the path or the name of the exe. I do a system search for a regfile and fil in the Propertys and than I need to lanch the exe file.. When I try to lanch it with the "Property Custum Action" It fails.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 16, 2009
04:34 AM
make sure you set the property which is the exefile path before the custom action gets invoked.
also, if you search the exe file in script you can launch the exefile directly in script. I just asked this question and ChandanOmkar gave me the answer.
see:http://community.installshield.com/showthread.php?t=191043
also, if you search the exe file in script you can launch the exefile directly in script. I just asked this question and ChandanOmkar gave me the answer.
see:http://community.installshield.com/showthread.php?t=191043
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 16, 2009
08:20 AM
Can I do this silenty?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 17, 2009
07:13 AM
I'm not sure if I'm misunderstanding you, but it sounds like you need to follow this sequence:
Do the system search to fill in the property containing the path.
Create a "set a directory" custom action to set a path equal to the value of the property.
Create a "launch an executable" custom action using the directory entry created, with any parameters the program needs.
Do the system search to fill in the property containing the path.
Create a "set a directory" custom action to set a path equal to the value of the property.
Create a "launch an executable" custom action using the directory entry created, with any parameters the program needs.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 17, 2009
07:16 AM
I will try it.. Sounds good.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 17, 2009
09:19 PM
the LaunchApplication has a "nShowWindow" argument, which can be set to SW_HIDE. also you can launch an exe file with parameter /S, and pass "/qn" to msiexec.
eg: PATH_TO_FILE/xxx.exe /S /V"YOUR_SILENTMODE_PARAMS /qn"
eg: PATH_TO_FILE/xxx.exe /S /V"YOUR_SILENTMODE_PARAMS /qn"
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 20, 2009
06:35 AM
Thanks for all the help!!
I have found a solution!..
#define APPLICATION szProgram
#define CMD_LINE szCmdLine
//#define wShowWindow
// Include Ifx.h for built-in InstallScript function prototypes.
#include "Ifx.h"
export prototype ExFn_LaunchApp(HWND);
function ExFn_LaunchApp(hInstall)
STRING svValue,szProgram,szCmdLine;
NUMBER nTimeOut,nShowWindow,ntOptions;
begin
szProgram = ("C:\\Program Files\\Microsoft Visual Studio 9.0\\Common7\\IDE\\Devenv.exe");
szCmdLine = "/command Tools.InstallCommunityControls";
LaunchApplication (szProgram, szCmdLine, "", SW_HIDE,nTimeOut, LAAW_OPTION_SHOW_HOURGLASS);
if (LaunchApp (APPLICATION, CMD_LINE) < 0) then
MessageBox ("Unable to launch "+APPLICATION+".", SEVERE);
endif;
end;
I have found a solution!..
#define APPLICATION szProgram
#define CMD_LINE szCmdLine
//#define wShowWindow
// Include Ifx.h for built-in InstallScript function prototypes.
#include "Ifx.h"
export prototype ExFn_LaunchApp(HWND);
function ExFn_LaunchApp(hInstall)
STRING svValue,szProgram,szCmdLine;
NUMBER nTimeOut,nShowWindow,ntOptions;
begin
szProgram = ("C:\\Program Files\\Microsoft Visual Studio 9.0\\Common7\\IDE\\Devenv.exe");
szCmdLine = "/command Tools.InstallCommunityControls";
LaunchApplication (szProgram, szCmdLine, "", SW_HIDE,nTimeOut, LAAW_OPTION_SHOW_HOURGLASS);
if (LaunchApp (APPLICATION, CMD_LINE) < 0) then
MessageBox ("Unable to launch "+APPLICATION+".", SEVERE);
endif;
end;
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)