Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > How do I run a batch file at logoff or shutdown?

Reply
Thread Tools Display Modes

How do I run a batch file at logoff or shutdown?

 
 
Zilla
Guest
Posts: n/a

 
      06-22-2010
Subject line pretty much says it all. We all know how to exeucte scripts/app
during startup, but what about during logoff/shutdown?

--

------------------------------
Thanks,
Chris


 
Reply With Quote
 
 
 
 
Skiffle
Guest
Posts: n/a

 
      06-22-2010
Chris,

Google is your friend

http://www.lmgtfy.com/?q=how+to+run+...le+at+shutdown

MB

"Zilla" <> wrote in message
news:73B5E717-E853-4AE1-8BA8-...
> Subject line pretty much says it all. We all know how to exeucte
> scripts/app during startup, but what about during logoff/shutdown?
>
> --
>
> ------------------------------
> Thanks,
> Chris
>
>


 
Reply With Quote
 
Zilla
Guest
Posts: n/a

 
      06-22-2010

Sorry I forgot to mentioned that I googled before I posted, and the links
pointed to XP. I didn't find a decent link for Vista.


"Skiffle" <> wrote in message
news:hvp0nl$3f7$...
> Chris,
>
> Google is your friend
>
> http://www.lmgtfy.com/?q=how+to+run+...le+at+shutdown
>
> MB
>
> "Zilla" <> wrote in message
> news:73B5E717-E853-4AE1-8BA8-...
>> Subject line pretty much says it all. We all know how to exeucte
>> scripts/app during startup, but what about during logoff/shutdown?
>>
>> --
>>
>> ------------------------------
>> Thanks,
>> Chris
>>
>>

>



 
Reply With Quote
 
Leythos
Guest
Posts: n/a

 
      06-22-2010
In article <es7$>, zilla62
@XSPAMbellsouth.net says...
>
> Sorry I forgot to mentioned that I googled before I posted, and the links
> pointed to XP. I didn't find a decent link for Vista.


Open a control box (dos shell) and type SHUTDOWN /? and then scroll back
up to see the arguments to the command.

For a restart I normally use:

shutdown /f /r /t 5

If you are a domain admin you can even issue the command to other
computers, something we normally do on a weekend to ensure that
computers are restarted at least once a week.



--
You can't trust your best friends, your five senses, only the little
voice inside you that most civilians don't even hear -- Listen to that.
Trust yourself.
(remove 999 for proper email address)
 
Reply With Quote
 
Zaphod Beeblebrox
Guest
Posts: n/a

 
      06-22-2010

"Zilla" <> wrote in message
news:es7$...
>
> "Skiffle" <> wrote in message
> news:hvp0nl$3f7$...
>>
>> "Zilla" <> wrote in message
>> news:73B5E717-E853-4AE1-8BA8-...
>>> Subject line pretty much says it all. We all know how to exeucte
>>> scripts/app during startup, but what about during logoff/shutdown?
>>>

>> Chris,
>>
>> Google is your friend
>>
>> http://www.lmgtfy.com/?q=how+to+run+...le+at+shutdown
>>
>>

> Sorry I forgot to mentioned that I googled before I posted, and the
> links pointed to XP. I didn't find a decent link for Vista.
>
>

The same method that works for XP works for Vista. That said, the
only way I know to do this is using the Group Policy Editor,
gpedit.msc, which isn't available in Home versions of Windows.

If you have a non-Home version, just Start - gpedit.msc - Computer
Configuration - Windows Settings - Scripts (Startup/Shutdown) -
Shutdown. Then use the Add button to add whatever batch file you want
to run on shutdown.

Oh yeah, ignore Leythos' reply, his command will just force a restart
of your PC...

--
Zaphod

Arthur: All my life I've had this strange feeling that there's
something big and sinister going on in the world.
Slartibartfast: No, that's perfectly normal paranoia. Everyone in the
universe gets that.


 
Reply With Quote
 
Zilla
Guest
Posts: n/a

 
      06-25-2010
"Zaphod Beeblebrox" <> wrote in message
news:hvqav3$dsg$...
>
> "Zilla" <> wrote in message
> news:es7$...
>>
>> "Skiffle" <> wrote in message
>> news:hvp0nl$3f7$...
>>>
>>> "Zilla" <> wrote in message
>>> news:73B5E717-E853-4AE1-8BA8-...
>>>> Subject line pretty much says it all. We all know how to exeucte
>>>> scripts/app during startup, but what about during logoff/shutdown?
>>>>
>>> Chris,
>>>
>>> Google is your friend
>>>
>>> http://www.lmgtfy.com/?q=how+to+run+...le+at+shutdown
>>>
>>>

>> Sorry I forgot to mentioned that I googled before I posted, and the links
>> pointed to XP. I didn't find a decent link for Vista.
>>
>>

> The same method that works for XP works for Vista. That said, the only
> way I know to do this is using the Group Policy Editor, gpedit.msc, which
> isn't available in Home versions of Windows.
>
> If you have a non-Home version, just Start - gpedit.msc - Computer
> Configuration - Windows Settings - Scripts (Startup/Shutdown) - Shutdown.
> Then use the Add button to add whatever batch file you want to run on
> shutdown.
>
> Oh yeah, ignore Leythos' reply, his command will just force a restart of
> your PC...
>
> --
> Zaphod
>
> Arthur: All my life I've had this strange feeling that there's something
> big and sinister going on in the world.
> Slartibartfast: No, that's perfectly normal paranoia. Everyone in the
> universe gets that.
>
>


That explains why I don't have gpedit.msc, I have Vista Home Premium.
Thanks!

-Chris


 
Reply With Quote
 
 
 
Reply

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
batch File Raghuveer Alapati Windows Server 0 05-25-2010 12:39 PM
How to copy iPhone SMS to TXT file on computer? daren Windows Vista Music, Pictures and Video 0 05-19-2010 12:34 AM
Copying Shared folders and retaining share and file permissions Bry M Server Networking 7 03-24-2010 01:12 PM
Error: Agent failed detecting with reason: 0x80248008 (WSUS client AAM Windows Server 0 12-30-2009 03:26 AM
Guest Only after Bill ActiveSync 1 07-23-2006 07:22 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59