i have a testcomplete project/testitem that i would like to be able to schedule using the Task Scheduler and I have been trying everything I can think of and have been able to research on the internet and simply cannot get it to work. First, it should be said that i can bring up a command prompt window on the VM where I want this to run and i can manually run testexecute with a command line argument list that runs it perfectly. if i simply try to stick that into the task scheduler i get a message indicating that the "requested operation requires elevation". so i have placed the call to testexecute with the argument list into a powershell script called runTcAsAdmin.ps1 and I can manually run that successfully. i created a bat file called runTcAsAdmin.bat into which I placed the following code
Echo OFF
PowerShell.exe -NoProfile -Command "& {Start-Process PowerShell.exe -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File ""%~dpn0.ps1""' -Verb RunAs}"
and directed by Task Scheduler job to run the bat file. After i run it the Last Run Result message indicates "the operation completed sucessfully" but it didn't do anything that was in the script (like it does when i run the script manually using the command prompt or the powershell script).
my ps1 file looks essentially like this:
Start-Process -FilePath "C:\Program Files (x86)\SmartBear\TestExecute 15\x64\Bin\TestExecute.exe" -ArgumentList "/exit /run <fully qualified path>\<project suite name>.pjs /p:<project name> /t:ProjectTestItem1"
what step or parameter am i missing? does it matter the order of the command line parameters for testexecute?