TestExecute, CMD & UAC
I have an interesting issue I thought I'd reach out to the community for help with.
- UAC is completely disabled (see 1.png)
- A VB.NET ClickOnce console application monitors a folder for a indication of a new compile of our desktop software.
- When a compile occurs, it grabs the latest copy of the TC project from TFS, installs the compile and calls a batch file.
- The batch file contains the TestExecute command line, which instructs TETestExecute to run the project.
- Once the testing finishes and TestExecute closes, the CMD window doesn't close...which means the ClickOnce application can't continue and I need to intervene (which I'm trying to avoid)
Enabling UAC does allow the CMD window to close, but then I can't install our software (TE doesn't recognise the objects). Disabling UAC again allows TE to recognise the objects, but then the CMD window doesn't close. Quite the pickle.
Example batch file:
"c:\Program Files (x86)\SmartBear\TestExecute 12\bin\TestExecute.exe" "C:\TestComplete\Automation.pjs" /el:"C:\TestComplete\CanaryExport.mht" /r /project:"Canary" /exit /DoNotShowLog /SilentMode
Again, I've tried adding "exit" or "exit 0" to the end of the batch file but that's not helped.
So, I'm a little bit stuck. I'll give SmartBear Support a try if no-one's had similar experiences, but it hits me as more of an environment issue.
I've given the solution stated there a try, but unfortunately it didn't work.
I think the issue is that it doesn't recognise that TestExecute has closed, so CMD waits for it.
Thought I'd add the contents of the new bat file, in case I didn't understand the solution.
"c:\Program Files (x86)\SmartBear\TestExecute 12\bin\TestExecute.exe" "C:\TestComplete\Automation.pjs" /el:"C:\TestComplete\CanaryExport.mht" /r /project:"Canary" /exit /DoNotShowLog /SilentMode taskkill /f /im cmd.exe