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
- :
- VBScript Custom Action - Where to Call?
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
Sep 22, 2009
05:22 PM
VBScript Custom Action - Where to Call?
I am very new to InstallShield and feeling left out with absolutely no help to even do simple things. If anyone can guide me in the right direction, I greatly appreciate it as this really drives me nuts.
I am using the BasicMSI project and use this condition for installing certain features:
ISIISMETABASECOMPATPRESENT AND (VersionNT=502 OR (VersionNT = 600 AND WindowsBuild=6001))
I have already set the custom action as per a KB article for testing whether IIS is installed or not using the ISIISMETABASECOMPATPRESENT property. This condition should evaluate to true only for Windows 2003 and Windows 2008 servers.
But when I tried installing on the Win2K3 server where IIS is installed, the feature was not enabled.
I want to verify whether the VersionNT and ISIISMETABASECOMPATPRESENT values are set properly and created a new custom action as follows:
1. Custom Action named: IISMsgBox, Type = VBScript, Location = Stored in Binary table, Source = "test.vbs" (which just has a messagebox).
2. Now I call this in the Next click of InstallWelcome and LicenseAgreement. But I am stuck on what event to use. I tried using the NewDialog, DoAction etc with Argument as "IISMsg" and the vb script never works or never gets called whatsover. I don't have any conditions set for this as well.
Can anyone help me or point me in the right direction as to which conditon/event/argument I should use to make this VBS beingcalled on my Next click?
I am using the BasicMSI project and use this condition for installing certain features:
ISIISMETABASECOMPATPRESENT AND (VersionNT=502 OR (VersionNT = 600 AND WindowsBuild=6001))
I have already set the custom action as per a KB article for testing whether IIS is installed or not using the ISIISMETABASECOMPATPRESENT property. This condition should evaluate to true only for Windows 2003 and Windows 2008 servers.
But when I tried installing on the Win2K3 server where IIS is installed, the feature was not enabled.
I want to verify whether the VersionNT and ISIISMETABASECOMPATPRESENT values are set properly and created a new custom action as follows:
1. Custom Action named: IISMsgBox, Type = VBScript, Location = Stored in Binary table, Source = "test.vbs" (which just has a messagebox).
2. Now I call this in the Next click of InstallWelcome and LicenseAgreement. But I am stuck on what event to use. I tried using the NewDialog, DoAction etc with Argument as "IISMsg" and the vb script never works or never gets called whatsover. I don't have any conditions set for this as well.
Can anyone help me or point me in the right direction as to which conditon/event/argument I should use to make this VBS beingcalled on my Next click?
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Sep 23, 2009
04:28 AM
Firstly,
The best place to see if the property is being set is in an installation logfile. You can run your msi like this:
msiexec /i /l*v c:\mylog.log
At the bottom of your log you will see a dump of properties where you can see if the property exists.
As for your vbscript, that isn't needed to test a property as you can see but not to dismiss it out of hand because you'll want to use this type of custom action later anyway probably.
For a begginer, definitely use the installshield interface for creating custom actions, it takes away a lot of the pain in creating them. I'd suggest using the custom action vbscript stored in binary table, browse for your file and that is your custom action stored correctly. If you want to use it from the GUI then you need to run a DoAction from a next button for example and choose the name of your custom action you just created. However, properties like this are probably not resolved at the GUI stage (installuisequence), therefore you might need to run it in the installexecsequence which runs after the GUI. I suggest you read up more on the different sequencing what they are designed for and when they run. Also one other gotcha is to ensure that your actions conditions are allowing your custom action to run. Again search the log file for your action, if it runs it should have a return value of 1. If your conditions are false, it will say something like 'skipping action, condition is false'
The best place to see if the property is being set is in an installation logfile. You can run your msi like this:
msiexec /i
At the bottom of your log you will see a dump of properties where you can see if the property exists.
As for your vbscript, that isn't needed to test a property as you can see but not to dismiss it out of hand because you'll want to use this type of custom action later anyway probably.
For a begginer, definitely use the installshield interface for creating custom actions, it takes away a lot of the pain in creating them. I'd suggest using the custom action vbscript stored in binary table, browse for your file and that is your custom action stored correctly. If you want to use it from the GUI then you need to run a DoAction from a next button for example and choose the name of your custom action you just created. However, properties like this are probably not resolved at the GUI stage (installuisequence), therefore you might need to run it in the installexecsequence which runs after the GUI. I suggest you read up more on the different sequencing what they are designed for and when they run. Also one other gotcha is to ensure that your actions conditions are allowing your custom action to run. Again search the log file for your action, if it runs it should have a return value of 1. If your conditions are false, it will say something like 'skipping action, condition is false'