Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run Batfile at startup

Status
Not open for further replies.

swaroop

Programmer
Feb 4, 2001
100
0
0
US
Hi All,

I am working on XP I have my own logon on it. My login can be used by some others too. When I set some Environment variables, others who use this system are deleting the variables I set. I want to save all the env settings in a bat file and I want my Bat file to run on start of the XP. That means when I start my windows XP it has to run the bat file and make Env variables available to all the applications.

Thanks in advanse.

Regards,

Swaroop.
 
Just curious, why did you choose Microsoft Windows 2000 Server Forum to post an XP problem?

Glen A. Johnson
"Give the laziest man the hardest job and he'll find the easiest way to do it."

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
I am in an impression that Win2000 prof know more than Home ver like XP. Sorry if I give any trouble.

Regards,

Swaroop.
 
What kind of variables are you looking to load???
if you have a server you may be able to add them to the login script...
If you have a standalone computer then you can probably add your variables to the autoexec.nt file within c:\%systemroot%\system32...

or you can add a batch file to the startup menu under...
C:\Documents and Settings\All Users\Start Menu\Programs\Startup

~ K.I.S.S - Don't make it any more complex than it has to be ~
 
Glen is right that htis is off topic. However in the spirit of these forums, here is how to do what you want.

Set your bat file as a startup script in the local computer policy.

Click Start, Run
Type MMC <enter>
Click File
Select Add/Remove Snap In
Click Add
Select Group Policy, click add
Click Finish, Close OK

Navigate to Computer configuration/ Admin templates/Windows Settings/Scripts

Double click Startup Scripts. Click Show files. Put you file in there. Close the File window. Click Add and select your script.

 
Hi markdmac,

I could not find a group policy when I say add. I got a standalone snapin I did not find any group policy in that but I have local users and groups, I selected that and clicked on add and I got choose target machine, and I selected local computer and click Finish and it gave me an error message &quot;This computer is running Windows XP Home Edition, this snap-in may not be used with that version of the windows to manage user accounts for this computer, use user accounts tool in control panel.&quot; I did not know what to do. Need this in this regard.
Thanks in advance,
Swaroop

 
Sorry if I gave the wrong impression. I was wondering if you had a Windows 2000 server of something. Anybody is welcome here. As for me, I'm sorry I don't know enough about xp to be any help. Good luck.

Glen A. Johnson
If you're from Northern Illinois/Southern Wisconsin check out Tek-Tips in Chicago, Illinois Forum.

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
you can find the 'local security policy' in 'administrator tools' which is in 'control panel'.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top