[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to let windows automatic execute a bat file after startup

Posted on 2005-04-28
9
Medium Priority
?
557 Views
Last Modified: 2011-09-20
How to let windows automatic execute a bat file after startup?


Thanks
0
Comment
Question by:steven98
6 Comments
 
LVL 1

Accepted Solution

by:
g00334120 earned 120 total points
ID: 13884353
One way is to place the batch file in the startup folder for windows. Which version of windows are you running?

Another way is to go to the following key in the registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

Create a new key there of type String.

For its data value, type in the full path to the to bat file
e.g.

C:\Windows\mybat.bat

Every time windows loads up, this batch file will run.
0
 
LVL 6

Expert Comment

by:_iskywalker_
ID: 13884464
easier would be to put into autostart folder.
Just open windows explorer (start->run: explorer)
and copy your batch to the folder autostart
the location of autostart depends on which windows version you are using: in win9x was in windows\menu
in win2000 xp it is better you put in default user folder since it wil start for all users, if you want for one user you put it in in the user folder like:
c:\Documents and Settings\Doctor\Startmenu\Programs\autostart
so just put the batch in this folder.
0
 
LVL 29

Expert Comment

by:Michael Pfister
ID: 13884872
Both methods above require that a user logs on. If this is a problem you can use the Task Scheduleder and tick the "At System Startup" option.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 9

Expert Comment

by:fixnix
ID: 13885429
autostart?  Never saw that in English versions of XP/2k, anyway...might be the case in other languages.

location here is:

C:\Documents and Settings\<username>\Start Menu\Programs\Startup

Also, I believe placing it in "Default User" will only take effect for users created after the changes were made (It's like a template).
Placing your .bat in "All Users" will take effect for everyone immediately upon next login by anyone.

C:\Documents and Settings\All Users\Start Menu\Programs\Startup
0
 
LVL 3

Expert Comment

by:JamesHarrison
ID: 13886585
A really nice and neat way of doing this is to use: http://www.duodata.de/ntwrapper/ and create a service from your batch file.  This will then execute the batch file whenever you start the machine, even if a user doesn't log in.

James
0
 
LVL 1

Expert Comment

by:g00334120
ID: 14229179
I recommend a split between myself and JamesHarrison.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

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…
In a recent article here at Experts Exchange (http://www.experts-exchange.com/articles/18880/PaperPort-14-in-Windows-10-A-First-Look.html), I discussed my nine-month sandbox testing of the Windows 10 Technical Preview, specifically with respect to r…
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.
Suggested Courses

834 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