Solved

Admin user password prompt in logon script

Posted on 2004-10-07
3
564 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

762 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now