Board index » Visual Studio » GPO / local script conflicting results.
|
phlyman
|
GPO / local script conflicting results.
Visual Studio184
Hi all - I have a problem that has me foxed. I want to run a script that will display all the software installed on a PC (software installed using Windows installer). When I run the same script as a GPO policy on a PC, and then run an almost identical version on the PC itself, I get slightly different results. The GPO version doesn't show that AcrobatReader50 is installed. Here is the script that I ran locally and using a GPO. I only changed the path of the text file that is created. -------------------------------------------- Set objFSO = CreateObject("Scripting.FileSystemObject") Set objTextFile = objFSO.CreateTextFile("d:\log\gpo.txt", True) strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colSoftware = objWMIService.ExecQuery _ ("SELECT * FROM Win32_Product") objTextFile.WriteLine "---" & "Name" & " " & "Install State" For Each objSoftware in colSoftware objTextFile.WriteLine objSoftware.Name & "---" & objSoftware.InstallState & "---" Next objTextFile.Close ------------------------------------------------ Results from the script run on a local PC. (software.txt) ---Name Install State AcrobatReader50---5--- LotusNotes506a---5--- Adobe Reader 6.0.1---5--- Microsoft Office 2000 SR-1 Premium---5--- Microsoft Office 2000 Professional---5--- WebFldrs---5--- OracleSQLNet816---5--- ------------------------------------------------ Results from the script run as a GPO (gpo.txt) ---Name Install State LotusNotes506a---5--- Adobe Reader 6.0.1---5--- Microsoft Office 2000 SR-1 Premium---5--- Microsoft Office 2000 Professional---5--- WebFldrs---5--- OracleSQLNet816---5--- Thanks ! - |
