Chaps,
Using XCACLS in a script with a WMI command like this:
I want to get the STDOUT or STDERR from the XCALCS - how can I do this? I've looked at objshell.exec method, but it fires a visible window - I want to avoid that since I will be hitting thousands of users per run.
Using XCACLS in a script with a WMI command like this:
Code:
strCommand = "cmd /k xcacls \\server\drive$\folder /E /G User:RCXD"
Const HIDDEN_WINDOW = 12
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set objStartup = objWMIService.Get("Win32_ProcessStartup")
Set objConfig = objStartup.SpawnInstance_
objConfig.ShowWindow = HIDDEN_WINDOW
Set objProcess = objWMIService.Get("Win32_Process")
errReturn = objProcess.Create(strCommand, null, objConfig, intProcessID)
I want to get the STDOUT or STDERR from the XCALCS - how can I do this? I've looked at objshell.exec method, but it fires a visible window - I want to avoid that since I will be hitting thousands of users per run.