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

How get [INSTALLDIR] in custom action ?

Hello,

I have to do some tasks in a .vbs script.
The script have to modify some files installed and these files was installed in [INSTALLDIR].
How can I pass the [INSTALLDIR] value to the custom action ?
I have see that the property "InstallDir" is not valid if I starts the script "after file transfer" !

Thanks
Labels (1)
0 Kudos
(2) Replies
weakness
Level 6

Generally, you can get INSTALLDIR by using the line.

Session.Property("INSTALLDIR")

In Deferred, Commit, and Rollback Custom Actions, you need some step.

http://helpnet.flexerasoftware.com/robo/projects/installshield17helplib/AccessingProps-DeferredCAs.htm
0 Kudos
stephanerolland
Level 2

I have a similar question but concerning the use of JScript

Associated to a custom action, I have a *.js file, and I wiish I could write something in this spirit:
[FONT="Courier New"]
function doInstall()
{
installDir = InstallShieldObject.INSTALLDIR // <= this is what I'd like to do
var comandUpdateRegistry = "regedit /s" + installDir + "registryScript.reg"

oShell = WScript.CreateObject( "WScript.Shell" );
oShell.Run( updateRegistryScriptCommand );

return true;
}
[/FONT]


or Should I give up and use VBScript ?
0 Kudos