Summary
How to generate a log file with version number appending to msi verbose log.
Symptoms
When ever we install a msi the logfile will be created without the version number of installer, it will be helpful if the log file has version number append to the log file.
Resolution
You can execute the below vbscript code to set delete the unused component from your project ism file. You can also write the same code using PowerShell also
You can run the script using vbs editor or you can run the script using “wscript.exe” in cmdlet.
Path to wscript.exe “C:\Windows\System32>wscript.exe”
Here is my sample script to install a msi package and generate log with version number,
Const msiOpenDatabaseModeReadOnly = 0
Dim msi, db, view, Test, strLog
Set oShell = WScript.CreateObject( "WScript.Shell" )
Set msi = CreateObject("WindowsInstaller.Installer")
Set db = msi.OpenDataBase("<Path to msi package>", msiOpenDatabaseModeReadOnly)
Set view = db.OpenView("SELECT `Value` FROM `Property` WHERE `Property` = 'ProductVersion'")
Call view.Execute()
GetVersion = view.Fetch().StringData(1)
Test = GetVersion
Wscript.Echo Test
CStr(Test)
Wscript.Echo Test
oShell.CurrentDirectory = "C:\Users\Administrator\Downloads\"
strLog = "C:\SetupMsilog_" & Test & ".log"
oShell.Run "TestComponent.msi /l*v " & chr(34) & strLog,0,True
Related Articles
Logging An InstallScript MSI Project 358Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Case id: 00001065
Activity: Status change: 2 hours ago