VBScript getting results from Shell

You will want to use the WshShell object’s Exec method instead of Run. Then simply read the command line’s output from the standard streams. Try this one: Const WshFinished = 1 Const WshFailed = 2 strCommand = “ping.exe 127.0.0.1” Set WshShell = CreateObject(“WScript.Shell”) Set WshShellExec = WshShell.Exec(strCommand) Select Case WshShellExec.Status Case WshFinished strOutput = WshShellExec.StdOut.ReadAll … Read more

PSEXEC, access denied errors

Hi i am placing here a summary from many sources online for various solutions to “access is denied” : most information can be found here (including requirements needed) – sysinternal help as someone mentioned add this reg key, and then restart the computer : reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f Read … Read more

tech