Hi,
i'm using a wmi script that check the floppy and cdrom on PC.
the code is as follow:
[CODE]
strComputer = Inputbox("Enter computer name:")
Set objWMIService = GetObject("winmgmts:" &
"{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colDisks = objWMIService.ExecQuery ("Select * from Win32_LogicalDisk")
For Each objDisk in colDisks
Select Case objDisk.DriveType
Case 2
strFloppyExist = objDisk.DeviceID
wscript.echo "Floppy Drive: " & strFloppyExist
Case 5
strCDExist = objDisk.DeviceID
wscript.echo "CDROM Drive: " & strCDExist
Case Else
'Wscript.Echo "Drive type could not be determined."
End Select
Next
[/CODE]
when running this code on any local pc it works fine.
But when connecting to a remote pc on the LAN it gives the following error:
Error: Permission Denied:'Get Object'
Code: 800A0046
By the way i'm an administrator user on all pcs.
Can u help me please to solve this problem?