'Alan dot Kaplan at VA dot gov, 9/3/2010 'This deletes the RunAs key for all instances of the InstallShieldDriver 'This is a well know fix for DCOM silent install problems showing up as Error 1603 in SCCM, 'See http://richardbalsley.com/sccm-software-distribution-fails-with-error-code-1603-in-execmgr-Log Option Explicit On Error Resume Next Const HCR = &H80000000 dim wshShell Set wshShell = WScript.CreateObject("WScript.Shell") Dim strComputer dim oReg, oWMI Dim strQuery, colItems, objItem 'if run without arguments, fixes local PC 'if run with computer name as argument, fixes remote PC. '***** Use cscript as host in SCCM advertisement **** 'EX: cscript.exe //b InstallShieldDcomFix.vbs If WScript.Arguments.Count = 1 Then strComputer = WScript.Arguments(0) Else strComputer = wshShell.ExpandEnvironmentStrings("%COMPUTERNAME%") End If 'Connect to WMI Registry provider Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv") If Err <> 0 Then WScript.echo "Registry connection failed " & Err.Description WScript.Quit (100) End If 'and connect to CIMV2 Set oWMI = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") strQuery = "SELECT appid from Win32_DCOMApplication where caption = 'InstallShield InstallDriver'" Set colItems = oWMI.ExecQuery(strQuery,,48) For Each objItem In colItems FixId objItem.AppId Next WScript.Echo "Done" WScript.Quit(0) 'set errorlevel to 0 Sub FixID(strID) Dim strStringValueName,strVal 'Delete Runas value key if "Interactive User" strStringValueName = "RunAs" oReg.GetStringValue HCR,"AppID" &"\" & strID, strStringValueName, strVal If strVal = "Interactive User" Then oReg.DeleteValue HCR,"Appid" &"\" & strID, strStringValueName End If 'Clear errors which may occur when trying to read no existent key Err.Clear End Sub