vbscriptinstallscript

How to call VBScript in InstallScript project


I want to use a VB Script script file as the target of an InstallScript project prerequisite. I need to use VB Script because I must check several different conditions that are not possible using the regular conditions in the IS prerequisite editor (i.e., operating system conditions are OR, other conditions are AND.)

I've seen the link here but it does not apply to an InstallScript project.

I've also tried simply naming the in the "Specify the application you wish to launch" combo, but that doesn't appear to be working. (The .vbs script simply displays a modal dialog so that I can test the basic functionality.)

Can this be done?

enter image description here


Solution

  • It turns out that my VBS script was working all along, but I was not looking in the right part of the registry for the key I needed to make a decision on. On a 64 bit box, a 32 bit process looks at (is magically redirected to look at) the Wow6432Node subkey. So if I'm looking for the key

    HKLM\Software\BoGusman

    the process is actually looking at

    HKLM\Software\Wow6432Node\BoGusman

    The target key existed in the 64 bit registry but did not exist in Wow6432Node. Creating the key in both locations solved the problem.

    Thanks to @JNevill and @Steven Quan for getting me on the right track.