topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday December 13, 2024, 3:18 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Run a bat-file on system shutdown  (Read 15019 times)

Cotton

  • Participant
  • Joined in 2009
  • *
  • Posts: 3
    • View Profile
    • Donate to Member
Run a bat-file on system shutdown
« on: August 21, 2009, 06:19 PM »
I'm looking for a application that can run a bat-file when Windows Vista is going to shutdown/restart.

Does a application like this exist or would anyone like to create it?  :-*

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: Run a bat-file on system shutdown
« Reply #1 on: August 21, 2009, 07:33 PM »
This program will run a program before shutting down, but it's initiating the shutdown, not just detecting it.

http://www.autoitscr...617608&hl=detect system shutdown&fromsearch=1&#entry617608


scancode

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 641
  • I will eat Cody someday.
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Run a bat-file on system shutdown
« Reply #2 on: August 21, 2009, 07:57 PM »
would anyone like to create it?  :-*
* scancode raises a hand. Give me a couple minutes.
I can't get it to work :(
Sorreh!
« Last Edit: August 21, 2009, 09:55 PM by scancode »

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: Run a bat-file on system shutdown
« Reply #3 on: August 21, 2009, 11:54 PM »
Cotton please give more info.  Can this be a program or batch file that runs your command, then shuts down?  Or does it have to detect shutdown and run your program?

If the former, just make a .cmd file with 2 commands
YourCommand.exe
shutdown /t 60

to shutdown one minute after the first command completes.
To run the first command without waiting(something quick) use the Start command as in

start yourapp.exe
shutdown yadda yadda


lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: Run a bat-file on system shutdown
« Reply #4 on: August 21, 2009, 11:56 PM »
you can try either Xecutor (free for non-commercial use) or LastChance (freeware).

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: Run a bat-file on system shutdown
« Reply #5 on: August 22, 2009, 05:05 PM »
Looks like DShutdown also has this option:

http://dimio.altervista.org/eng/

I've been using DTaskManager and it seems well done so I might as well give DShutdown a try.

shaunpud

  • Participant
  • Joined in 2009
  • *
  • Posts: 1
    • View Profile
    • Donate to Member
Re: Run a bat-file on system shutdown
« Reply #6 on: August 24, 2009, 04:36 AM »
Just use Group Policy

Example here

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: Run a bat-file on system shutdown
« Reply #7 on: August 24, 2009, 03:53 PM »
Just use Group Policy

Example here

Not all versions of Windows have Group Policy Editor.  On my Windows7 eval it's Ultimate so I can keep Windows Media Player and IE from starting just using Group Policy.  On my Vista64 Home Premium I don't have it, so I have to employ a process monitor that kills them as soon as they rear their ugly heads.

Conquer

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 50
    • View Profile
    • Donate to Member
Re: Run a bat-file on system shutdown
« Reply #8 on: August 27, 2009, 11:12 AM »
I'm looking for a application that can run a bat-file when Windows Vista is going to shutdown/restart.

Does a application like this exist or would anyone like to create it?  :-*
here. it will run any program just edit the settings.ini file.

to make the program run on startup, place a shortcut
(not a copy of the program) to your startup folder.

program attached!
« Last Edit: August 27, 2009, 11:31 AM by Conquer »