![]() Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Rename a Volume
|
||
' Description: Changes the volume label for drive C to "Finance Volume."
strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colDrives = objWMIService.ExecQuery _ ("Select * from Win32_LogicalDisk where DeviceID = 'C:'") For Each objDrive in colDrives objDrive.VolumeName = "Finance Volume" objDrive.Put_ Next | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |