Solved

Admin user password prompt in logon script

Posted on 2004-10-07
3
567 Views
Last Modified: 2008-03-04
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
Comment
Question by:jpasint
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
jacauc earned 500 total points
ID: 12251247
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
 

Author Comment

by:jpasint
ID: 12252305
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
 
LVL 3

Expert Comment

by:jacauc
ID: 12256119
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Active Directory Audit 18 116
Issue to mail 11 100
Details to create developer account 10 39
Shutdown of Windows 7 > program > forced shutdown or cancel = ? 24 68
Windows 7 does not have the best desktop search built in. This is something Windows 7 users have struggled with. You type something in, and your search results don’t always match what you are looking for, or it doesn’t actually work at all. There ar…
I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question