Solved

Admin user password prompt in logon script

Posted on 2004-10-07
3
570 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Occasionally Windows/Microsoft Updates will fail to update. We have found a code that will delete all temporary files and re-register all dll's related to Windows/Microsoft Updates! This works 99% of the time to get the updates working again! The…
Introduction How to create multiboot configuration with XP\Vista and Windows 7 on it? And most important question - how to do this correctly so not to have any kind of nightmares we get when system gets screwed? First of all one should realize t…
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.

729 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