misbah_akbari
6 years agoFrequent Visitor
Test Complete does not recognizes the application if the application is launched in win7 through cmd
Hi
Test Complete does not recognise application when application is launched through command prompt in win 7
but it recognizes application and objects when the same application is launched through command prompt in win 10
If Instr(OS_VERSION, "Microsoft Windows 10") <> 0 then
Set objShell = CreateObject("WScript.Shell")
Set objEnv = objShell.Environment("Process")
WinPath = objEnv("SystemRoot") & "\System32\runas.exe"
'TestUser access information.
domain = Sys.HostName
AppExePath = "C:\Program Files\App.exe"
Call objShell.Run("runas /user:" & domain & "\" & user & " " & aqString.Quote(AppExePath ), 1, FALSE)
Call Sys.WaitProcess("runas", 5000)
objShell.AppActivate(WinPath)
Call objShell.SendKeys(password & chr(13))