Arquivo não encontrado ao usar objshell.run - vbscript
Quando eu tento executar o script, ele gera um erro que o arquivo não existe .. No script ele faz o arquivo echos existe embora. Ter tentado com objshell.run "" "apppath" "" mas sem sorte .. :( Por favor ajude.
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("WScript.Shell")
AppPath = objshell.ExpandEnvironmentStrings("%ProgramFiles%") + "\ERUNT\ERUNT.EXE"
wscript.echo apppath
if fx = objfso.FileExists("apppath") then
wscript.Echo "File Exists"
objshell.run apppath
Else
Wscript.echo "File Does not Exist"
end IF