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: Hiding command window in custom action
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
‎Jul 14, 2008
12:27 PM
Hiding command window in custom action
I currently have a couple of custom actions (Launch Executable) which simply run a command (SQLCMD, etc.) in my Basic MSI project. The commands could be extremely quick or last a couple of minutes, in which case the console window shows status.
Ideally, I would like the actual command window not visible to user. However, I don't want the user to think the Installer is frozen.
I was hoping to be able to do the following:
Get InstallShield to launch the commands hidden (how?). In this case, I would very much want to be able to show some text to the user in the main installation window since custom actions never show any description (or can they?)
Any thoughts? Perhaps I'm missing something very simple with custom actions or scripts. Thanks.
Ideally, I would like the actual command window not visible to user. However, I don't want the user to think the Installer is frozen.
I was hoping to be able to do the following:
Get InstallShield to launch the commands hidden (how?). In this case, I would very much want to be able to show some text to the user in the main installation window since custom actions never show any description (or can they?)
Any thoughts? Perhaps I'm missing something very simple with custom actions or scripts. Thanks.
(11) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 14, 2008
02:41 PM
Have you looked at LaunchAppAndWait with the LAAW_OPTION_HIDDEN flag?
http://helpnet.acresso.com/robo/projects/DevStudio9HelpLangref/LangrefLaunchAppAndWait.htm
http://helpnet.acresso.com/robo/projects/DevStudio9HelpLangref/LangrefLaunchAppAndWait.htm
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 14, 2008
04:37 PM
Coming form C# background, was hoping to stay away from InstallScript in my Basic MSI project. But I guess I'll give it a shot. Does anyone have any good links on tutorials for the InstallScript syntax/language in addition to InstallShield's help?
Edit --> On second thought, InstallScript is much better and powerful than I first thought. Do most people tend to use InstallScript functionality within Basic MSI installers for custom actions?
Edit --> On second thought, InstallScript is much better and powerful than I first thought. Do most people tend to use InstallScript functionality within Basic MSI installers for custom actions?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 14, 2008
10:53 PM
On a related note...
Is it possible to set the current step description for the main Install Shield window (above the progress bar) when launching a custom action?
For instance, if a managed dll custom action is used that may take any length of time it would be helpful to display some related text to let user know what is happening.
Is it possible to set the current step description for the main Install Shield window (above the progress bar) when launching a custom action?
For instance, if a managed dll custom action is used that may take any length of time it would be helpful to display some related text to let user know what is happening.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 15, 2008
09:51 AM
For unmanaged custom actions, InstallScript is a great choice. I advocate it's use for Basic MSI projects.
If you already have a dependency on the framework, then I reccomend skipping InstallScript and writing managed custom actions using DTF.
For publishing messages, look at the ActionText table and the MsiProcessMessage API. The InstallationProgress dialog has controls that subscribe to messages and progressbar that subscribes to ticks to do what you are describing.
If you already have a dependency on the framework, then I reccomend skipping InstallScript and writing managed custom actions using DTF.
For publishing messages, look at the ActionText table and the MsiProcessMessage API. The InstallationProgress dialog has controls that subscribe to messages and progressbar that subscribes to ticks to do what you are describing.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 16, 2008
05:14 AM
Hi All,
Even i am facing the same problem. I am using the basic MSI project i just need to hide the console window, I chosed Launch executable as action type. So can any body help me how to hide the console window :confused: I am using Install Scield 2008.
Thanks,
Swaroop.
Even i am facing the same problem. I am using the basic MSI project i just need to hide the console window, I chosed Launch executable as action type. So can any body help me how to hide the console window :confused: I am using Install Scield 2008.
Thanks,
Swaroop.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 16, 2008
08:54 AM
Windows Installer does not natively have the ability to supress the window for an EXE Custom Action Type. The two ways of doing this are
1) If you wrote the EXE yourself, compile it as a windowless Windows Application instead of a Console application.
2) Use an intermediate custom action to shell out to the program and hide the window ( like the LaunchAppAndWait example given previously ).
1) If you wrote the EXE yourself, compile it as a windowless Windows Application instead of a Console application.
2) Use an intermediate custom action to shell out to the program and hide the window ( like the LaunchAppAndWait example given previously ).
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 16, 2008
09:49 AM
Thanks for the reply Christopher Painter. I created a entry-point function to call LaunchAppAndWait and i created a install script custom action , the problem is the function name is not showing in the custom action wizard. I followed the procedure that is there in the fallowing example "http://helpnet.acresso.com/robo/projects/DevStudio9HelpLangref/LangrefLaunchAppAndWait_example.htm". Can you please guide me further how to get my function in the coustam action wizard.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 16, 2008
11:46 AM
Did you export the function? ( Can you/do you want to / post your rul file? )
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 16, 2008
11:58 AM
Yes i exported the function , here is the code i used
EXPORT prototype MyFunction(HWND);
function MyFunction(hMSI)
begin
end;
But i did not posted the rul file. can you tell me how to post that file.
Thanks.
EXPORT prototype MyFunction(HWND);
function MyFunction(hMSI)
begin
end;
But i did not posted the rul file. can you tell me how to post that file.
Thanks.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 16, 2008
12:04 PM
Please try changing EXPORT to lowercase:
export prototype MyFunction(HWND);
export prototype MyFunction(HWND);
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 23, 2008
03:02 AM
Thanks RobertDickau and Christopher Painter , it worked.
![](/skins/images/3B39CE851FDD5528C393F146EB70A2D0/responsive_peak/images/icon_anonymous_message.png)