Forum Discussion

Evan's avatar
Evan
New Contributor
7 years ago

TestExecute 12 'dotNET' is undefined using windows task scheduler

I have a powershell script that runs testexecute which works fine when I run the script from the powershell command line. I'm trying to have the same script run from a windows task scheduler task. The powershell script runs but doesn't run like it does when running from the command line. /ErrorLog output shows 'dotNET' is undefined and tcHostingProcess.exe process crashed messages.

 

I saw a few posts about this but they were older for TC8 and TC9. The solutions for those were to uninstall and reinstall TC which I have tried but for TE12. I have dotNET 4.7.1 installed and TE shows the .NET Classes Support plug-in installed and enabled. I haven't seen much else about task scheduler and TE. I haven't used TE much, any ideas or places to debug further?

  • Evan's avatar
    Evan
    7 years ago

    I have UAC disabled on the machine. I also have the task set to run as a domain administrator and checked the box to run with highest privileges. I will look to see if there is something else that may be privilege related that is causing issues but I have my doubts about that.

     

    Edit: It appears something got messed up with the user profile of the administrator account I was trying to use for the task and windows was creating temp profiles for the task to use. There were messages about this in event viewer I had missed. This was causing the main issues. Switched the task to run as a different administrator account and it appears to be working now. Thanks!

  • Not exactly a solution to your issue but I run TC (12.5) from a bat file via the Task Scheduler and it works fine.  When I tried to execute TC/TE directly from the Windows Task Scheduler it did not work.  But the .bat file did.

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      Something you might need to do is have the task run with elevated permissions.  TestComplete, on startup, does read stuff from certain areas of the drive that may be restricted by UAC.

      • Evan's avatar
        Evan
        New Contributor

        I have UAC disabled on the machine. I also have the task set to run as a domain administrator and checked the box to run with highest privileges. I will look to see if there is something else that may be privilege related that is causing issues but I have my doubts about that.

         

        Edit: It appears something got messed up with the user profile of the administrator account I was trying to use for the task and windows was creating temp profiles for the task to use. There were messages about this in event viewer I had missed. This was causing the main issues. Switched the task to run as a different administrator account and it appears to be working now. Thanks!