Condition check using VBScript CA
Posted 19 July 2012 - 12:04
I am trying to check if Internet Explorer is opened during my installation and block installation from proceeding further until IE is closed.
I have written a VBScript custom action to check if IE is opened and then display a message. I am calling this CA during on-click event of Install button in ReadytoInstall dialog. But after displaying the message, installation keeps progressing. How do I block the installer from proceeding further until IE is closed.
That is, clicking on Install should do nothing until IE is closed.
Thanks for your time,
Posted 24 July 2012 - 14:34
string szServiceName, szMessage;
szServiceName = "Explorer.exe";
if (nServiceType = SERVICE_RUNNING)then
MsiSetProperty(hMSI, "ServiceRunning", "1");
MsiSetProperty(hMSI, "ServiceRunning", "0");
Then in your condition on the ReadyToInstall dialog
change your condition for end dialog to:
|OutOfNoRbDiskSpace <> 1 AND ServiceRunning <> 1|
This should prevent the dialog from progressing and allow them to close the app and click Install again. Hope this helps!
** its worth noting the detection code above probably wont actually find internet explorer. But the important tidbit is the MsiSetProperty bit which should still help you. **
Edited by overlordchin, 25 July 2012 - 16:21.
Posted 26 July 2012 - 15:25
Session.Property "MyProperty" = Value
or something along those lines
Posted 06 August 2012 - 10:26
Actually I was trying with wrong condition. something like ServiceRunning = 1 instead of <>. Your suggestion helped me to try this.