![]() Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Add a Volume Mount Point
|
||
' Description: Adds a new volume mount point for the folder W:\Scripts. Note that in the WQL query, you must use two slashes rather than one, and you must also include two slashes at the end of the folder path. Thus the folder X:\Scripts\WMI would be listed as X:\\Scripts\\WMI\\.
strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery _ ("Select * From Win32_Volume Where Name = 'D:\\'") For Each objItem in colItems objItem.AddMountPoint("W:\\Scripts\\") Next | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |