Hey Guys,
My program is pointing to a vbScript ---> cscript.exe Sample.vbs
This sample.vbs contains:
Set WshShell = CreateObject("WScript.Shell")
Set objShell = CreateObject("Shell.Application")
Set fso = CreateObject("Scripting.FileSystemObject")
strCurDir = WshShell.CurrentDirectory
strExecute = chr(34) & strCurDir & "\setup.exe" & chr(34) & " " & "/configure" & " " & chr(34) & strCurDir & "\INSTALL32UK.xml" & chr(34)
WshShell.Run strExecute, 0, true
The script is not picking the current directory --> Instead it is resolving to
"C:\windows\System32\setup.exe" /cofigure "C:\windows\system32\INSTALL32UK.xml"
The program is ever running with status in SCCM Console.
When i check one of the client logs: I could find the below error,
the specified object could not be found in wmi
Please suggest any other way that my vbscript will resolve Current Directory of my DP and run successfully,