Forum Discussion

mfoster711's avatar
mfoster711
Regular Contributor
8 years ago

RebootAndContinue not working Windows 8 and 10

I am trying to use the RebootAndContinue method and it is not fully working on Windows 8 or Windows 10. It will reboot the computer but it does not log in. This is working on my Windows 7 computers.

 

All my test PCs are setup in a Workgroup, not a domain. All of them have a single user named "Admin1" that is setup as an Administrator on the PC. The PCs are already setup to automatically sign in with this user when they boot up.

 

I initially tried using RebootAndContinue without passing in the username or password and it did not work. I then added the username and password to the call and it works on Windows 7 but not 8 or 10.

 

Actually, it works the first time but not any time after that. I have a simple test that was looping multiple times and performing the RebootAndContinue each time. The first time I perform the RebootAndContinue it works but not any times after that on the Windows 8 or Windows 10. It fails to log in. If I manually enter the password the process will continue and TestComplete will open and continue my script.

 

The error I am getting is: "The call to the RebootAndContinue method failed.The method saves information to the  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon registry key. The user account, under which you are running your test, does not have permissions to save data to this key.To solve the problem, change the permissions. The easiest way to do this is to add the account to the Power Users or Administrators group on your computer. For complete information on this, see Windows documentation."

 

Why is this failing on Windows 8 and Windows 10 even though I am using a user that is setup as an admin?

4 Replies

  • mfoster711's avatar
    mfoster711
    Regular Contributor

    I gave up on using RebootAndContinue because I had multiple issues with it and never got it to work consistently.

    • Some times it simply would not reboot. It would close TestComplete but not reboot
    • It would mess up my existing process for automatically logging into the PC for the user
    • It would start too fast after reboot and not find a floating license for TestComplete
    • Also there were issues not recognizing my network drive after reboot
    • I also tried just using Sys.Restart and had issues with it

    I created my own process that works much better

    • I set the RunOnce registry key in Windows to start a batch file
    • I then ran a different Batch file that is setup to reboot the PC after a 10 second delay
    • I then exit my script and the PC will reboot
    • On startup, the batch file runs but I put a 20 second delay at the beginning.
    • After the delay, it simply uses the TestComplete command line options to start my script up again
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Have you tried setting up TestComplete/TestExecute to Run As Administrator?  There are subtle differences between being an admin and actually running an application with administrator level access.  Even as a local admin on my workstation, if I have to do something that requires admin access, it still prompts me.  This is the UAC stuff from Windows 8 and 10.  See if that works.

    • mfoster711's avatar
      mfoster711
      Regular Contributor

      I tried running as administrator and this creates a different issue. When i open TestComplete and try to select my project it can not find it. The project is stored on a network drive mapped to S:

       

      I can open Window Explorer and browse the S: drive but TestComplete does not see it if I run TestComplete as administrator. 

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Just means that the administrator doesn't have the S drive mapped.  Instead of using the mapped drive name, try using the FQDM mapping of \\<servername>\<sharename> etc