Mh there is still a problem collecting X64 software that when running any of our vbs scripts
FROM an X64 system (like Win7 or S2k8R2) and auditing an X64 system aswell.
You will only get Software 32 Bit and not Software 64 Bit.
Ive tried all combinations but the vb registry calls ONLY queries 32 Bit even when asking the wow64node key....
Weird. I found a local solution for all environments on the web but dot get it implemented into audit.vbs.
[code]
strComputer = "172.30.1.253"
strUser="Administrator"
Strpass="password"
Subhive="Software\Microsoft\Windows\CurrentVersion\Uninstall\"
Const HKLM = &h80000002
Set objCtx = CreateObject("WbemScripting.SWbemNamedValueSet")
objCtx.Add "__ProviderArchitecture", 32
objCtx.Add "__RequiredArchitecture", TRUE
Set objLocator = CreateObject("Wbemscripting.SWbemLocator")
Set objServices = objLocator.ConnectServer(strComputer,"root\default",strUser, strPass,,,,objCtx)
Set oReg = objServices.Get("StdRegProv")
WScript.Echo "32-bit Applications"
WScript.echo "-------------------"
Call GetApplications
objCtx.Add "__ProviderArchitecture", 64
objCtx.Add "__RequiredArchitecture", TRUE
Set objLocator = CreateObject("Wbemscripting.SWbemLocator")
Set objServices = objLocator.ConnectServer(strComputer,"root\default",strUser, strPass,,,,objCtx)
Set oReg = objServices.Get("StdRegProv")
WScript.Echo "64-bit Applications"
WScript.echo "-------------------"
Call GetApplications
Sub GetApplications
' Use ExecMethod to call the GetStringValue method
Set Inparams = oReg.Methods_("EnumKey").Inparameters
Inparams.Hdefkey = HKLM
Inparams.Ssubkeyname = subhive
set Outparams = oReg.ExecMethod_("EnumKey", Inparams,,objCtx)
For Each strSubKey In Outparams.snames
Set Inparams = oReg.Methods_("GetStringValue").Inparameters
Inparams.Hdefkey = HKLM
Inparams.Ssubkeyname = Subhive & strSubKey
Inparams.Svaluename = "DisplayName"
set Outparams = oReg.ExecMethod_("GetStringValue", Inparams,,objCtx)
if (""&Outparams.SValue<>"") then
wscript.echo Outparams.SValue
end if
Next
End Sub
[/code]
May any1 of you integrate this into audit.vbs and replace the regarding sections.
I will be happy to test the implemantation tho.
thx
Pat