Is it possible to run a batch file when XP boots?

  • Somnamna
  • Born
  • Born
  • Somnamna
  • Posts: 1

Post 3+ Months Ago

I miss "autoexec.bat"! :( How can I run a batch file when I restart my XP computer? All I want to do is keep my modem logs, but they appear to be cleaned out from the log file each time I reboot and restart my internet connection - even if I specify "Append to log" in my modem's properties in Control Panel.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • JrzyCrim
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2062

Post 3+ Months Ago

You should be able to put it in your startup folder in the Start menu (or a shortcut to your batch file).

correction: your logs would probably be erased by the time windows ran your batch.
  • JrzyCrim
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2062

Post 3+ Months Ago

I think the best thing would be to run your batch file as a logoff script. Goto Start menu, run, enter gpedit.msc. In the left pane, under User Configuration, select Windows Settings | Scripts, Double click on Logoff, select Add, then browse to your batch file. When you log off, windows will execute that file.

If you have any relative pathnames in your batch, you should change them to full path names because any logs you save might end up in the Logoff directory:
C:\WINDOWS\system32\GroupPolicy\User\Scripts\Logoff

Edit: I tested a simple batch file as a logoff script.

dir.bat saved on my desktop
Code: [ Select ]
dir >test.txt


It did run, but the output file was saved to the Scripts\Logoff directory. The directory of ...Scripts\Logoff was written to the file instead of the desktop directory. You will have to include a full pathname for you output file as well as any other paths you use.

Hope this helps

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 35 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.