Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 574
  • Last Modified:

Admin user password prompt in logon script

Have a problem with GPO on computer startup.

First off, I have no computer startup scripts at all, only single logon scrip. The logon script is .vbs encrypted into a .vbe file that does nothing more than runs a .bat file or two but the .vbe script uses the runas command to execute the .bat files as an admin user. The problem is the script stops and requests the password to be entered instead of just going on like it should. This prompt for the password while the script executes only occurs after the computer has been rebooted. You enter the password at the point that it asks for it or just hit ctrl c to break out. If you then logoff and back in, the script runs with no problem. You can logoff and on with no problem and the script runs fine. It is only the first logon after the computer is booted up that the script prompts for the password of the “admin” user specified in the .vbe script.

Thanks in advance.

Joe.
0
jpasint
Asked:
jpasint
  • 2
1 Solution
 
jacaucCommented:
Chances are good that the service controlling RunAs is not started yet at that time.

Try putting a 5 or 10 second "sleep" before the Runas command and see what happens.
We'll take it from there then.

Good Luck
Cheers
J
0
 
jpasintAuthor Commented:
That seems to have worked. Does the Secondary Logon service not start until someone actually logs onto the PC? I'm sure I waited long enough for the service to start before before trying to login. Maybe I will look through Computer Management to see if the service starts prior to logon or not. Anyway, thanks for the help.

Take care.

Joe
0
 
jacaucCommented:
It will not start before logon because it is a service that has the property of "allow servive to interact with desktop" checked in the "log on" tab of the service properties.

Let me know if you need more info.
Thanks
J
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now