Hi All,
Typically, when you install a windows installer package, a cached version of this msi file is present in the <Windows>\installer folder. This msi package is used for further maintenance operations like repair, modify etc..
Now in my scenario, I have a second version of the product and I want something's to be done in the uninstall package of the previous version.. SO I feel this can be achieved by modifying the cached msi from the <Windows>\installer folder.. I am very keen to know how to find the name of the cached msi file from the windows system..
Any help in this direction would be appreciated..
Thanks
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.
Find the name of the Cached MSI
Started by
SujitUk
, Feb 18 2005 05:52
3 replies to this topic
Posted 18 February 2005 - 10:27
The info is available: If you write a Custom Action of type "Windows Installer DLL", you can use the function MsiGetProductInfo. I assume this info can also be retrieved by script.
Note this doesn't mean everybody can change this file, for most users it's readonly.
Note this doesn't mean everybody can change this file, for most users it's readonly.
Posted 18 February 2005 - 12:03
Here's a script I wrote recently to modify a property within the property table of a cached MSI:
Const sPRODCODE = "{17DAB648-906B-4C29-B296-6FD780708377}"
Const sREBOOTMODE = "r"
Const msiViewModifyUpdate = 2
Const msiOpenDatabaseModeDirect = 2
Set oInst = CreateObject("WindowsInstaller.Installer")
sDBPath = oInst.ProductInfo(sPRODCODE, "LocalPackage")
Set oDB = oInst.OpenDataBase(sDBPath, msiOpenDatabaseModeDirect)
sQuery = "SELECT `Value` FROM `Property` WHERE `Property` = 'REBOOT'"
Set oView = oDB.OpenView(sQuery)
oView.Execute
Set oRecord = oView.Fetch
oRecord.StringData(1) = sREBOOTMODE
oView.Modify msiViewModifyUpdate, oRecord
oView.Close
oDB.Commit
Set oInst = Nothing
This script was intended to avoid a forced reboot during repairs or uninstall.
Const sPRODCODE = "{17DAB648-906B-4C29-B296-6FD780708377}"
Const sREBOOTMODE = "r"
Const msiViewModifyUpdate = 2
Const msiOpenDatabaseModeDirect = 2
Set oInst = CreateObject("WindowsInstaller.Installer")
sDBPath = oInst.ProductInfo(sPRODCODE, "LocalPackage")
Set oDB = oInst.OpenDataBase(sDBPath, msiOpenDatabaseModeDirect)
sQuery = "SELECT `Value` FROM `Property` WHERE `Property` = 'REBOOT'"
Set oView = oDB.OpenView(sQuery)
oView.Execute
Set oRecord = oView.Fetch
oRecord.StringData(1) = sREBOOTMODE
oView.Modify msiViewModifyUpdate, oRecord
oView.Close
oDB.Commit
Set oInst = Nothing
This script was intended to avoid a forced reboot during repairs or uninstall.