Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 576
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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