I have a VBScript which detects local hard drive letters and it will store them some where. Now I want to remove the Windows Drive from it. I mean first it finds all local hard drives, then detects windows drive and remove it from local hard drives list and then store them in the target variable. How to do it?
Here is the VBScript:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colDisks = objWMIService.ExecQuery _
("Select * from Win32_LogicalDisk")
drives = ""
For Each objDisk in colDisks
if objDisk.DriveType = 3 then
if drives > "" then
drives = drives & ";"
end if
drives = drives & objDisk.DeviceID & "\"
end if
Next
Thanks,
I would prefer to
it later
So:
output:
ADDED:
I doubt that you can’t do it yourself, but anyway: