Loading |
VBScript |
JavaScript |
Powershell |
Search Options: List Files Using an Asynchronous QueryContent of List Files Using an Asynchronous Query.vbsMD5 Hash: 00A3D2F6D3A2333395E6099557E2EB21 |
||
' Description: Uses an asynchronous query to enumerate all the files on a computer. This is primarily a demonstration script; if actually run, it could take an hour or more to complete, depending on the number of files on the computer.
Const POPUP_DURATION = 120 Const OK_BUTTON = 0 Set objWSHShell = Wscript.CreateObject("Wscript.Shell") strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set objSink = WScript.CreateObject("WbemScripting.SWbemSink","SINK_") objWMIService.ExecQueryAsync objSink, "Select * from CIM_DataFile" objPopup = objWshShell.Popup("Starting file retrieval", _ POPUP_DURATION, "File Retrieval", OK_BUTTON) Sub SINK_OnObjectReady(objEvent, objAsyncContext) Wscript.Echo objEvent.Name End Sub | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |