Batch file to execute upon restart/shutdown - Techist - Tech Forum

Go Back   Techist - Tech Forum > Computer Software > Microsoft Windows and Software
Click Here to Login
Closed Thread
 
Thread Tools Display Modes
 
Old 12-12-2007, 10:18 AM   #1 (permalink)
Newb Techie
 
Join Date: Dec 2007
Posts: 5
Default Batch file to execute upon restart/shutdown

Hello,

I am creating a batch file that will save the Event logs to a network drive upon a restart / shutdown.

I am using Windows XP Pro SP2 machines that run Windows Disk Protect. This program erases all saved data from the time it was turned on until the next shutdown/ reboot. This includes the Event Logs which leaves me no information when the users have a problem.

The only problem I have is figuring out where to place the batch file, once operational, so that it executes every time the machine is restarted or shutdown.

Is there somewhere in Windows that I can place this file to get this to occur? If so will you please send me in the correct direction? If not, does anyone have any suggestions ?

Thanks for any help!
__________________

mtbjunkie is offline  
Old 12-12-2007, 10:27 AM   #2 (permalink)
Ultra Techie
 
Join Date: Jul 2006
Posts: 889
Default Re: Batch file to execute upon restart/shutdown

google it, you could try and put it in the start up folder what you can find in the task menu or in ya C drive. also theres away i think doing i by typing in msconfig in run, not sure what to do from then on, some1 might be able to help you!!!
__________________

__________________
jay_bo is offline  
Old 12-12-2007, 11:07 AM   #3 (permalink)
Newb Techie
 
Join Date: Dec 2007
Posts: 5
Default Re: Batch file to execute upon restart/shutdown

Having it run at start does not get me the outcome that I want. I could have it run on startup but then I would not have anything in the event log because everything is deleted when you restart or shutdown the machine which means that when you turn on the machine and the startup commands run, the files are empty.

I need it to run upon the user or a program restarting/shutting down the machine.

Thanks anyways
mtbjunkie is offline  
Old 12-12-2007, 12:58 PM   #4 (permalink)
I know things...
 
wicked23's Avatar
 
Join Date: Jun 2006
Location: Pennsylvania
Posts: 398
Default Re: Batch file to execute upon restart/shutdown

try
Start>run>type gpedit.msc
Under computer configuration> windows settings>Scripts startup/shutdown.
wicked23 is offline  
Old 12-12-2007, 01:27 PM   #5 (permalink)
Junior Techie
 
Join Date: Jul 2006
Posts: 83
Default Re: Batch file to execute upon restart/shutdown

I dont know why your event log is erasing entries at startup, reset it to defaults and it should always save the events, i still have stuff from june. Anyway go to "C:\Documents and Settings\%username%\Start Menu\Programs\Startup" and just drag it into there it should work, I do it on my computer that way.
steak1986 is offline  
Old 12-12-2007, 02:27 PM   #6 (permalink)
Newb Techie
 
Join Date: Dec 2007
Posts: 5
Default Re: Batch file to execute upon restart/shutdown

Quote:
Originally Posted by steak1986 View Post
I dont know why your event log is erasing entries at startup, reset it to defaults and it should always save the events, i still have stuff from june. Anyway go to "C:\Documents and Settings\%username%\Start Menu\Programs\Startup" and just drag it into there it should work, I do it on my computer that way.
Ok so I have already stated why and what deletes the Event Logs. Windows Disk Protect (google it). Also, I stated that I didn't want it to run at "StartUp". Thank you anyways.

Wicked, thanks this is what I was looking for.My team in Denver knew exactly where to put it when I mentioned it to them so I don't even have to worry about that now. Thanks for your help everyone.

God Bless
mtbjunkie is offline  
Old 12-12-2007, 03:40 PM   #7 (permalink)
I know things...
 
wicked23's Avatar
 
Join Date: Jun 2006
Location: Pennsylvania
Posts: 398
Default Re: Batch file to execute upon restart/shutdown

Your welcome.

I love when people post without reading .
wicked23 is offline  
Old 12-12-2007, 06:45 PM   #8 (permalink)
Ultra Techie
 
Join Date: Jul 2006
Posts: 889
Default Re: Batch file to execute upon restart/shutdown

Quote:
Originally Posted by wicked23 View Post
I love when people post without reading .
I do it all the time, special with dates lol i put a reply on a thread that was two months old the other day
__________________

__________________
jay_bo is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
WTF is a Bad Block? MikesCreation Hardware Repairs and Troubleshooting 18 02-24-2008 09:31 PM
Hard Drive Errors!!! Bad or Faulty HDD? mike4realz Hardware Repairs and Troubleshooting 3 09-19-2007 01:56 AM
seagate 80gigs failing.. acuariano Hardware Repairs and Troubleshooting 27 08-27-2007 10:43 PM
Another Hijack Log boo HijackThis Logs (finished) 17 06-26-2007 12:30 PM
Batch file steak1986 Microsoft Windows and Software 6 04-11-2007 06:03 PM



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -5. The time now is 06:51 AM.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.