cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
IanBrooke
Level 5

VBScript Questions

Hi,
I'm very new to Installshield Express and have 2 questions on vbScript custom actions which I am hoping you can help with:

1. atm I am getting the value of a registry key using
 Set objShell = CreateObject("WScript.Shell")
value=objShell.RegRead(key)

is this the 'prefered' (best) way of getting a registry value or is there something better?

2. Having got the value of that registry key how do I set the installer's default INSTALLDIR to that value?

Many thanks
Ian
Labels (1)
0 Kudos
(3) Replies
weakness
Level 6

Hello.

Do you know this setting?

Setting INSTALLDIR from the Registry
http://kb.flexerasoftware.com/doc/Helpnet/isxhelp18/ExpressTaskSettingINSTALLDIRfromReg.htm

It maybe will do.
0 Kudos
IanBrooke
Level 5

weakness wrote:
Hello.

Do you know this setting?

Setting INSTALLDIR from the Registry
http://kb.flexerasoftware.com/doc/Helpnet/isxhelp18/ExpressTaskSettingINSTALLDIRfromReg.htm

It maybe will do.


Thanks for your reply.
I had not seen this before but I've now tried it out. The problem is that some users will have the setting and some will not. When the registry key exists this method works fine but when it does not the default Installdir is set to C:\[productname] - not what I want at all!

Ian
0 Kudos
weakness
Level 6

Hello.

In this case, I guess you have to create VBScript custom action or something in order to set INSTALLDIR value.

If you can retrieve a value from registory using VBScript, then you can also set INSTALLDIR value as follows VBScript code.

Session.Property("INSTALLDIR") = < PATH >
0 Kudos