I have an executable which scans my drives when I directly run it. However same executable is fails to run when used below VB Script to run the executables
Sub ScanDrive
Dim objShell, objExec
Set objShell = CreateObject("WScript.Shell")
wscript.sleep 5000
strErrorCode = objShell.Run(".\scanmydrive.exe /ADL /SECURE /NOBREAK" ,0 , True)
WScript.StdOut.write(".")
WScript.Sleep 1000
Wscript.echo strErrorCode
End Sub
There is no error thrown? Is it sleeping? :)
Updated Question
When I directly run the executable, it shows a message as follows, which proves that executable is not started if it triggered from script.
Engine version: 1100.19 for Win32.
Scanning started.
c:\$Recycle.Bin\S142223018-65415\$I906XC1.log