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

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?
Labels (1)
0 Kudos
(1) Reply
cbragg
Level 7

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'
0 Kudos