Click to See Complete Forum and Search --> : WMI security related problem


Paul Massey
08-15-2002, 11:47 AM
I am trying to write a script to provide support information for our helpdesk that runs on a desktop computer running Windows 2000 under a user context. The script runs perfectly with local admin rights but certain information - specifically the machine serial number and model number are returned incorrectly or blank! I am guessing that the WIN32 provider will not return some objects that belong to win32_computersystem and win32_bios without certain privileges? I am using the lines:

Set objWMIService = Getobject("winmgmts:{impersonationlevel=impersonat e}!\.
ootcimv2")
Set oBIOScol = objWMIService.ExecQuery("Select * from Win32_BIOS")
Set oComputerSystemcol = objWMIService.ExecQuery("Select * from Win32_ComputerSystem")

and then calling the instances

ComputerSystem.Model
and
BIOS.SerialNumber

How can I modify the script or security on the PC to enable the script to work under a user context?