Remote run Script issue
- From: bobgfish <bobgfish@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 23 Oct 2007 01:58:00 -0700
Hello
Trying to run a simple utility to change the drive letter of the CD ROM.
The script runs fine when running locallly. However if I try and run it
remotely by changing the strComputer name I get an Access Denied message.
This happens on the .Put_ line. Ideas? I think it is something in Group
Policy as I've removed the machine from the domain and it then works.
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colDisks = objWMIService.ExecQuery ("Select * from Win32_LogicalDisk
Where DriveType='5'")
For Each objDisk In colDisks
cdrom = objDisk.DeviceID
Next
Set colVolumes = objWMIService.ExecQuery ("Select * from Win32_Volume")
For Each objVolume In colVolumes
If objVolume.DriveLetter = cdrom Then
objVolume.DriveLetter = "Z:"
objVolume.Put_
End If
Next
.
- Follow-Ups:
- Re: Remote run Script issue
- From: Chris M
- Re: Remote run Script issue
- Prev by Date: IIS Config
- Next by Date: Re: Remote run Script issue
- Previous by thread: IIS Config
- Next by thread: Re: Remote run Script issue
- Index(es):
Relevant Pages
|