Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 164
  • Last Modified:

How to automatically run certain batch files when system is reboot?

I have to manually run sdkvars.bat to use C# compiler each time I reboot MS Dos under Windows 2000.  How to set the system environment variables or something else to make sdkvars.bat to run automatically when I reboot my computer or MS DOS?
Thanks for any help in advance.
0
siyu
Asked:
siyu
  • 3
  • 3
1 Solution
 
Yan_westCommented:
Just add the batch file in the startup folder.. or do you need to start it before you login?
0
 
oBdACommented:
Simply enter them to the persistent environment variables.
Right-click "My Computer", Properties, Advanced tab, button "Environment variables". Add the variables defined in the batch file to your profile (or the machine profile, if other users need those as well).
0
 
siyuAuthor Commented:
Thanks, oBdA

I have another batch file  and I have to run it manually too, its content is not as simple as sdkvar, do you know how to automatically run it whenever I reboot system?
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
oBdACommented:
By adding a shortcut to the batch file in the startup folder in your start menu?
Or what does that batch do?
0
 
siyuAuthor Commented:
Thanks for your response.
I added the shortcut to the batch file in C:\Documents and Settings\myloginname\Start Menu\mybatch.bat, but it doesn't run when I reboot my pc. This batch file allows me to access my company's network drives, its content is like this:

net use /delete * /y

:Transactiondata
ifmember transactiondata
if not errorlevel 1 goto processing
net use m: \\mycompany\days

:processing
ifmember processing
if not errorlevel 1 goto sales
net use n: \\myapp1\eps
net use O: \\zontalk\ztalk
net use R: \\mycompany\processing

:sales
ifmember sales
if not errorlevel 1 goto services
net use S: \\mycompany\sales
.....

Any idea? Did I put the shortcut in wrong place?
0
 
oBdACommented:
Yes; that shortcut needs to go into the folder named "startup" (assuming you're using an English version); Start Menu\Programs\Startup
0
 
siyuAuthor Commented:
Thank you again, it works now. =:)
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.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now