matnawer.blogg.se

Msi return code 3010
Msi return code 3010





msi return code 3010

Since he started at Coretech in 2007, he has focused on Scripting and Development, primarily developing tools, extensions and scripts for the System Center Suite. Twitter: Gottlieb Svendsen is a Microsoft Cloud and Data Center Management MVP (), Working as Global Lead Developer, Senior Consultant and Trainer at CTGlobal, where he is one of the driving forces in keeping CTGlobal a System Center Gold Partner and member of the System Center Alliance. this means we can after a deployment, connect to the eventlog and read the error messages, if needed. Otherwise we call the logerror function, which will log the error to the errorlog on the local PC.

Msi return code 3010 install#

Using error handling we check if the install is OK (0 = Success, 3010 = success but reboot pending) This product code I found by using the GetProductCode function in the same line.Īfter the uninstall, we install the msi packages again. We call the uninstall function sending the productcode as a parameter. ObjShell.LogEvent 1, "Installation Error: " & Message & " MSI Return Code: " & ReturnValĪll we have is the product code finder function, and uninstall function, and a log function. StrKeyPath = "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\" & subkey StrKeyPath = "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" ObjShell.LogEvent 4, "Seaching in Wow6432Node registry for installed products by search term: " & strName GetProductCode = Replace(Replace(strValue, "MsiExec.exe /X",""), "MsiExec.exe /I","") ObjShell.LogEvent 4, "Found Installed "& strName &" product Code: " & Replace(Replace(strValue, "MsiExec.exe /X",""), "MsiExec.exe /I","") If InStr(LCase(strValue), LCase(strName)) > 0 Then OReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue StrKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" & subkey OReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys StrKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" StrComputer & "\root\default:StdRegProv") Set objWMIService = GetObject("winmgmts:" & "!\\" & _ Set ObjShell = CreateObject("WScript.Shell") '// Global constant and variable declarationsĭim ObjShell, ReturnVal, ExistingVersion, ProductCode, objWMIService, objProcess, colProcess, ProcessesFound, ProductName ' // Searches registry for the productcodes for the old programs. ' // Purpose: Uninstall old versions and install new. ' // Author: Jakob Gottlieb Svendsen, Coretech A/S.







Msi return code 3010