I have on msi in which i can change the directory fromt he deafult INSTALLDIR.
during installation of this msi, i will be changing the default INSTALLDIR and i want to get this directory path from another ism.
I cannot write to teh registry the path from the msi.
I tried using VB script to open the first msi and get the INSTALLDIR ans also the Component destination path but it is returning the default INSTALLDIR and not the modified path..
Is there anyway i can get this new path
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Change in Directory during installation
Started by
its_me
, Feb 10 2005 11:24
4 replies to this topic
Posted 10 February 2005 - 15:30
You probably could manually modify e the MSI install by opening it in an MSI install editor like Orca.
However, I'm not sure as this isn't really an InstallScript question, so ... **moving topic**
However, I'm not sure as this isn't really an InstallScript question, so ... **moving topic**
Posted 10 February 2005 - 16:57
Not sure if that is your question, but you can write the value of INSTALLDIR to registry by setting up a registry entry with value [INSTALLDIR].
Stefan Krüger
InstallSite.org twitter facebook
Posted 10 February 2005 - 22:00
Using the Windows API you can call MsiGetProductInfo to get various properties such as the location of the installation, but you have to know tht product code of the target:
CODE |
TCHAR szYourVersion[MAX_PATH]; DWORD dwBuffer = MAX_PATH; UINT uResult = ::MsiGetProductInfo( pszProductCode, INSTALLPROPERTY_INSTALLLOCATION, szLocation, &dwLocationBuffer ) ; |
You can find MsiGetProductInfo in the platform sdk under "Installer Function Reference"
Offhand, I don't know how you would do this in script.
Michael Bergman
LumenVox LLC
LumenVox LLC
Posted 10 February 2005 - 22:06
In vbscript it would look like this:
Const sPRODCODE = "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}"
Set oInst = CreateObject("WindowsInstaller.Installer")
msgbox oInst.ProductInfo(sPRODCODE, "InstallLocation")
Set oInst = Nothing
Const sPRODCODE = "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}"
Set oInst = CreateObject("WindowsInstaller.Installer")
msgbox oInst.ProductInfo(sPRODCODE, "InstallLocation")
Set oInst = Nothing