I am trying to change the packagecode of my msi project at build time. I am trying to use VBScript to do that and have tried to follow the windows installer documentation but I have not been successful. I am not even able to read the package code.
Here is my code snippet:
Set installer = Wscript.CreateObject("WindowsInstaller.Installer")
Dim sumInfo : Set sumInfo = installer.SummaryInformation(<path to my installer>, 1)
value = sumInfo.Property(9)
9 is the PID_REVISIONNUMBER which is supposed to have the package code.
When I print out the value, there is nothing there.
Can someone please help?
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.
Changing Package Code
Started by
mkapasi
, Feb 24 2009 04:06
2 replies to this topic
Posted 24 February 2009 - 10:03
That is the weirdest thing!
I ran some MSDN code against one of my MSIs and got all the properties I requested first time. Subsequent runs, however, returned no properties at all. When I switched to interrogating another MSI, I once again got all the properties.
Then I checked the SDK sample scripts, specifically WiSumInf.VBS. Check out the use of the 'cUpdate' variable in that sample.
I ran some MSDN code against one of my MSIs and got all the properties I requested first time. Subsequent runs, however, returned no properties at all. When I switched to interrogating another MSI, I once again got all the properties.
Then I checked the SDK sample scripts, specifically WiSumInf.VBS. Check out the use of the 'cUpdate' variable in that sample.
Edited by VBScab, 24 February 2009 - 10:20.
- Don't know why 'x' happened? Want to know why 'y' happened? ProcMon will tell you.
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.