timbo343 Posted November 10, 2008 Posted November 10, 2008 Im trying to get some info on what drives are mapped for users that are currently logged on. here is the script which works fine when im logged in but when i change the STRCOMPUTER = "Name of computer" it dont work. Can someone help me out please. Thanks Tim strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colDrives = objWMIService.ExecQuery _ ("Select * From Win32_LogicalDisk Where DriveType = 4") For Each objDrive in colDrives Wscript.Echo "Drive letter: " & objDrive.DeviceID Wscript.Echo "Network path: " & objDrive.ProviderName Next
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