View Full Version : custom actions

09-16-2005, 05:21 PM
Hi all,

Does any one have any vbscript, which will read a registry entry and set INSTALLDIR ? or if any one know how to do this, please let me know.


09-17-2005, 02:29 AM
You will want to do a search on RegRead method, and Session.Property method in the forums.

09-17-2005, 08:21 AM
You can do registry reading using Installscript itself. Why do you need VBScript to do that ?

09-18-2005, 12:58 AM
Please note that InstallScript is not supported in Express Edition.

09-19-2005, 10:33 AM
Hi there,

First of all thanks.

I wrote a code based off example found in IS and MS sites, but IS always fails, right at CreateObject. Do you know why? I get the first message but not the "Test" message.

' Get the value of INSTALLDIR
Dim sInstalldir
Dim tInstalldir
Dim WshShell
sInstalldir = Session.Property("INSTALLDIR")
' Show it.
MsgBox sInstalldir

' Check to see if a file exists
set WshShell = WScript.CreateObject("WScript.Shell")
MsgBox "Test"
tInstalldir = WshShell.RegRead("HKLM\Software\TEST\TEST\DRIVE")
MsgBox tInstalldir

Session.Property("INSTALLDIR") = tInstallDir & "New"


09-19-2005, 02:42 PM
Please refer to this thread (http://community.installshield.com/showthread.php?t=146928&highlight=wscript). For other discussions on this topic, you will want to do a search on WScript in the forums.