Explain VBScript which remove installshield from DCOM

57 Views Asked by At

I have inherited a portion of VBScript code that is included in an .msi file created using InstallShield.
Since it throws exceptions on certain Windows machines my goal is to determine if this older code is still necessary.

While researching, I found an old article that discusses the purpose of this code which related to DCOM.
However, I am still uncertain whether it is relevant specifically for basic .msi setups or if it applies only to the install script. You can refer to the following link for more information on the topic: https://forums.ivanti.com/s/question/0D51B00005BxazJSAR/installshield-msis-and-what-i-have-learned?language=en_US

Is anyone knowledgeable about this?

Const HKEY_CLASSES_ROOT = &H80000000 
'On Error Resume Next 
strComputer = "." 
Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv") 
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") 
Set colItems = objWMIService.ExecQuery("Select * from Win32_DCOMApplicationSetting",,48)

For Each objItem in colItems 
    If objItem.Description <> "" Then 
        arrFind=Split(objItem.Description) 
        For i=0 To UBound(arrFind) 
            If lcase(arrFind(i))="installshield" then 
                'Wscript.Echo "Description: " & objItem.Description 
                'Wscript.Echo "AppID: " & objItem.Description 

                strKeyPath = "AppID\" & objItem.AppID 
                strEntryName = "RunAs" 
                strValue = "" 
                objReg.DeleteValue HKEY_CLASSES_ROOT,strKeyPath,strEntryName 
            End if 
        Next 
    End If 
Next
0

There are 0 best solutions below