/bundles/itninjaweb/img/Breadcrumb_cap_w.png
Hi Folks,

I'm new to WPS. My requirement is like this. I have an .msi. I should change the INSTALLDIR to C:\test on desktops and to D:\test on servers. So I have registered one enviornment system variable like SoftDir=C:\test in desktops and SoftDir=D:\test in servers. So i want to set the INSTALLDIR in tables of WPS according to this SoftDir. Is there any way in WPS or ORCA to set the variable for ex: set sample=HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\SoftDir(key)……sample should fetch the value of softdir key (C:\test or D:\test) in the registry....So that i can use sample in place of INSTALLDIRECTORY......Hope you understand my problem. Appreciate your help. Thanking you.
0 Comments   [ - ] Hide Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity

Answers

0
Well I guess you could do it that way if you wanted - seems rather over-engineered and having to create environment variables on all workstations and servers (in my opinion) is messy. Better to keep everything internal to the MSI - there are a couple of easy options for starters:

1) If you need to keep a single MSI for both environments (or don't want a seperate transform / command line for servers) there is a standard property MsiNTProductType which you can use to detect the OS type then you could set the INSTALLDIR value accordingly or
2) Assuming the standard INSTALLDIR path is already C:\Test - you could just create an MST for the server installations which sets the INSTALLDIR to D:\Test

Your way is possible but you'd have fiddle around a lot more to get it working - the above 2 options are straight forward and you won't need to do anything outside of the package.

Hope this helps,
Rob.
Answered 03/11/2010 by: MSIPackager
Third Degree Black Belt

Please log in to comment
0
Hi Rob,

Thanks for your advice. For desktops i'm sure SoftDir is C:\test...but server i'm not sure whether it is D:\test or E:\test....In this case how can i proceed with the package....Please suggest...

Thanks
Sridhar. A
Answered 03/11/2010 by: sridhar22_85
Yellow Belt

Please log in to comment
0
Easiest solution is to create a server specific transform, add and entry in the property table INSTALLDIR = D:\Test (or E:\Test) and install via the following command line:

msiexec /i your.msi transforms=yourtransformname.mst /qb (or whatever switched you require)

You will get a validation error in the MST but don't worry about it.

Cheers,
Rob.
Answered 03/12/2010 by: MSIPackager
Third Degree Black Belt

Please log in to comment