/build/static/layout/Breadcrumb_cap_w.png

installing msi to variable %systemdrive%

Is it possible to set an msi to be installed to the variable %SYSTEMDRIVE%?

I have made a property INSTALLDIR=%SYSTEMDRIVE%\Apps. This is not working, any idea why?

0 Comments   [ + ] Show comments

Answers (9)

Posted by: anonymous_9363 15 years ago
Red Belt
0
It looks like you're trying to use the %SYSTEMDRIVE% environment variable. In WI, such variables only use the '%' sign as a prefix, not as a prefix and suffix. Also, all properties need to be enclosed in square brackets. Next, the trailing backslash is inserted automatically. Thus, you need:

INSTALLDIR=[%SYSTEMDRIVE]Apps

BTW, you should not use the Property table to set this property, as property resolution-ordering is random, so you couldn't guarantee that the SystemDrive property was retrieved before the engine had already tried to resolve INSTALLDIR. Use a 'Set Property' Custom Action.

Lastly, have you looked at using the ROOTDRIVE property?
Posted by: Bankeralle 15 years ago
Second Degree Blue Belt
0
I tried using the following suggestion

INSTALLDIR=[%SYSTEMDRIVE]Apps

This gave me also the same error message: Error 1606 (Could not access networklocation [%SYSTEMDRIVE]\Apps
I also tried with the windowsvaraiable ROOTDRIVE this gave me same error message


You wrote
BTW, you should not use the Property table to set this property, as property resolution-ordering is random, so you couldn't guarantee that the SystemDrive property was retrieved before the engine had already tried to resolve INSTALLDIR. Use a 'Set Property' Custom Action.

Im not sure if i follow you here can you be a mroe specific
Posted by: anonymous_9363 15 years ago
Red Belt
0
Where are you setting the property? In the MSI or MST? On the command line?
Posted by: Bankeralle 15 years ago
Second Degree Blue Belt
0
I have set the property in the msi, sorry not for being more specific previous time.

By the way it works when using the cmdline msiexec /I filename.msi INSTALLDIR=%SYSTEMDRIVE%\Apps
But as i said i would like to build this in the msi
Posted by: AngelD 15 years ago
Red Belt
0
Use a set property custom action with [%SYSTEMDRIVE]\Apps\
Posted by: Bankeralle 15 years ago
Second Degree Blue Belt
0
[%SYSTEMDRIVE]\Apps\

Somehow i cant seem this to work
I have created and SETPROPERY CUSTOM ACTION
Custom Action Name: XX
Property: INSTALLDIR
Property Value: [%SYSTEMDRIVE]\Apps\

This seems like it have no effect what so ever, is it something i missing here
Posted by: anonymous_9363 15 years ago
Red Belt
0
You will, of course, have run the installation with a verbose log, to see if your CA ran at all...?
Posted by: Bankeralle 15 years ago
Second Degree Blue Belt
0
Finally it works now. Thx for the help Angeld And VBScab
Posted by: AngelD 15 years ago
Red Belt
0
Please post what fixed it so others can benifit of the solution.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ