cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
scottysak
Level 3

Silent Install External programs Popups.

I launch some programs in my installscript using launch app and wait for example "iscsicpl.exe" or "iscsicpl.cpl". The iscsi initiator window. However, On a silent install, i would like to supress all the external pop ups that are not from my setup. For example windows errors. It makes my silent install not a very silent install. Any ideas on how to write and record external message boxes to the .iss file if there is any way? Thanks.
Labels (1)
0 Kudos
11 Replies
gavin_landon
Level 6

LaunchApplication has a SW_HIDE for applications it executes. Your saying thats not working?
0 Kudos
scottysak
Level 3

LaunchAppAndWait(WINDIR^"system32\\iscsicpl.exe", "", LAAW_OPTION_WAIT | SW_HIDE);

Just tried the above. Doesn't seem to work. is this wrong syntax?
0 Kudos
gavin_landon
Level 6

Yea, Based on other forum posts, which is a funny way to do it, I would try:

LaunchAppAndWait(WINDIR^"system32\\iscsicpl.exe", "", SW_HIDE, LAAW_OPTION_WAIT);

Most languages use the Bitwise inclusive "|" I know, but I don't think IS is one of them.
0 Kudos
gavin_landon
Level 6

BTW, you may want to look at WaitForApplication() as well, because it you can set a timeout. You don't want the application your executing to get into an infinite loop and get your installer locked up.
0 Kudos
gavin_landon
Level 6

Actually I see posts of both ways.. Maybe the bitwise inclusive is new to 2009. I was see it without for 2008.

I just tried it to see that 2009 doesnt like it without the bitwise inclusive.

I'll see if I can reproduce it your issue.
0 Kudos
gavin_landon
Level 6

Ok, I see your problem.. Seems InstallShield is ignoring SW_HIDE all together.

This doesn't even work.
LaunchAppAndWait(WINDIR^"notepad.exe", "", SW_HIDE);

Needs to be reported as a bug.
0 Kudos
scottysak
Level 3

Thanks Gavin for trying to reproduce, i'll see if i can figure out another way.
0 Kudos
gavin_landon
Level 6

Found a solution..

#define MY_HIDE 2
...
LaunchAppAndWait(WINDIR^"notepad.exe", "", LAAW_OPTION_WAIT|MY_HIDE);

Not sure why the SW_HIDE doesn't work, but if you define a HIDE of your own to 2. It works..
0 Kudos
gavin_landon
Level 6

Now that I think about it, I know what SW_HIDE doesn't work with other values, but still confused why it wouldn't work alone.. It's a bug in IS, but trying to think in a C++ world why it's an issue and how to resolve it.

If you go into any language, I'm using C++ so if I do the following:

int i = 5|0; //i = 5
int i = 2|0; //i = 2

SW_HIDE value is 0 making it transparent. I'm not sure how Microsoft handles that in their APIs since SW_HIDE is 0 in all the PC languages. That would be a challenge without changing the value of SW_HIDE to something beside zero. However passing only SW_HIDE should make the value 0, so I'm guessing in IS they were working on this issue and someone just commented the code for SW_HIDE altogether until they figure out how to resolve this issue.

Not sure why 2 works, I just started with -1 and was going 1, 2, 4, 8, but didn't have to go far before I noticed that 2 worked.. It may be the temporary solution until they resolve the SW_HIDE issue.
0 Kudos
gavin_landon
Level 6

BTW, they have an undocumented SWP_HIDEWINDOW with the value of 128. It too doesn't seem to work. Possibly not for this API, unsure.
0 Kudos
skutnar
Level 4

Old post, but anyway, you can use the much more controllable "LaunchApplication" to do what you want.

LaunchApplication(byval string szProgram, byval string szCmdLine, byval string szDirectory, byval number nShowWindow, byval number nTimeOut, byval number nOptions );

Example:
LaunchApplication(szProgram, szCmdLine, szDirectory, SW_HIDE, INFINITE, LAAW_OPTION_WAIT);
0 Kudos