How to execute a batch at Windows startup?

Hi,
I create a batch file under user1 login, schedule a task to execute it at 'startup'. However it looks like the task is executed only after user login, though I already provide the user login name and password when setting up the task.
Q#1. Is the task supposed to be executed before any user login if specified at 'startup'?
Q#2. Is such scheduled task user specific? Logically it should be. But if so, how can the system to execute the task scheduled under user1 without user1 login?
Q#3. How to automatically execute a task when a system starts up but before/without any user login?
Thanks.
richtreeAsked:
Who is Participating?
 
RubenvdLindenCommented:
Try AutoExNT instead. It can be found here: http://www.petri.co.il/download_free_reskit_tools.htm
A MS knowledgebase article on it can be found here: http://support.microsoft.com/kb/q243486/

I hope this helps
0
 
michkoCommented:
http://support.microsoft.com/kb/q243486/
This article explains how to run a batch file before login.

Another link with some very good scrips included is:
http://www.tek-tips.com/faqs.cfm?fid=5798
0
 
vladhCommented:
If you are using Active Directory, you can use Startup scripts in Computer portion of group policy objects. Scripts run through this GPO section run as SYSTEM account and have complete and unrestricted access to the computer. They will start before the user has a chance to log in.
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
richtreeAuthor Commented:
hi vladh,
can you provide more detailed steps on your approach? I like to know how to use it.
thanks a lot.
0
 
michkoCommented:
0
 
richtreeAuthor Commented:
Each and every response helps here! Thank you.
0
 
michkoCommented:
You're welcome.  Glad we could help.
0
 
vladhCommented:
richtree:

Use group policy objects editor to create/edit a GPO object and link it to the OU where your computers are. Open the GPO, browse to "Computer Configuration" portion of the GPO and open "Windows Settings", Scripts, Startup, then click on "Show files". An explorer window will open and you can drag your scripts there. WHen done, use "Add" button to add your scripts to the list and make sure to specify the desired execution order. There are a number of settings that control how the scripts are executed: synchronously or not (one after another or all at the same time), whether or not they should display output, and what would be timeout in case of failure. These additional settings are "Computer Configuration\Administrative Templates\System\Scripts"
Play with those settings a bot (In your testing environment, of course ;) before deploying them into production. YOu can run batch files, WIN32 executables or VBScripts this way.
0
 
richtreeAuthor Commented:
vladh, thank you very much for your detailed note.
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.

All Courses

From novice to tech pro — start learning today.