TestExecute, CMD & UAC
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
TestExecute, CMD & UAC
Hi All,
I have an interesting issue I thought I'd reach out to the community for help with.
My setup:
- 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.
Cheers
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This may be of some help:
https://stackoverflow.com/questions/17753562/batchfile-taskkill-im-cmd-exe-not-closing-cmd-exe?rq=1
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Edit:
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try
taskkill /f /im "cmd.exe"
also make sure you are running as Administrator
