[Vb]Rilevare software in pc remoto

mercoledì 22 aprile 2009 - 11.54

Hope Profilo | Junior Member

Ciao a tutti,
Ho uno script che mi permette di eseguire l'inventario dei pc(rilevazione HARDWARE-S.O.-STAMPANTI-SOFTWARE)
Mi viene rilevato tutto tramite script WMI,ma la parte relativa al software non mi funziona
Per eseguire una connessione remota ad un pc ho inserito:

Set objLocator = CreateObject( "WbemScripting.SWbemLocator" )
Set objWMIService = objLocator.ConnectServer ( strComputer, "root\cimv2", "UtenteAdmin", "password")
objWMIService.Security_.impersonationlevel = 3

Vi allego la parte relativa al software:

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Uninstall"
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
For Each subkey In arrSubKeys
strsubkey = subkey
strValueName = "DisplayName"
strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Uninstall\" & strsubkey
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
If IsNull(strValue) Then
strValue = strsubkey
End If

Se eseguo lo script in locale funziona,ma in remoto non c'è verso,il software non mi viene rilevato.
Grazie mille per ogni vostro aiuto.

Saluti

Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?

Dopo esserti registrato potrai chiedere
aiuto sul nostro Forum oppure aiutare gli altri

Consulta le Stanze disponibili.

Registrati ora !
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5