Arthur L Posted April 3, 2007 Posted April 3, 2007 Hello Guys,I need to change the drive letter for some 50 computers across the network. The current drive letter is "D" and I need to change it to "E" as per company policy.I have found a vbs script to do this:strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colVolumes = objWMIService.ExecQuery _ ("Select * from Win32_Volume Where Name = 'D:\\'") For Each objVolume in colVolumes objVolume.DriveLetter = "E:" objVolume.Put_ NextUnfortunately, Win32_Volume class doesn't work in WindowsXP since this is new in Windows 2003.I would ask for your help if this script is possible using autoit. Thanks!!
Sypher Posted April 3, 2007 Posted April 3, 2007 You could also create a macro that does that kind of thing.
BigDaddyO Posted April 3, 2007 Posted April 3, 2007 Unfortunately, Win32_Volume class doesn't work in WindowsXP since this is new in Windows 2003.I would ask for your help if this script is possible using autoit. Thanks!!Look into DiskPart.exe, It's comes with Windows XP and I believe it will also run on 2000 but you will have to copy it to the PC first.You need to build a Config.dat file with the following linesSelect Disk=1Select Partition=2assign Letter=EexitThen launch Diskpart as the followingDiskpart.exe /s Config.datLet me know if you need any more info.Mike
Arthur L Posted April 11, 2007 Author Posted April 11, 2007 thanks MikeOsdx, this seems to be what I am looking for!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now