Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us

avatar image

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

Login with username, password and session length
  • April 28, 2017, 04:57:25 PM
  • Proudly celebrating 10 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: IDEA: Run Before / After something  (Read 12220 times)


  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,898
    • View Profile
    • Donate to Member
IDEA: Run Before / After something
« on: April 24, 2007, 03:40:53 AM »
Some software allows you to run a command before or after the software itself is run. For example: Syncback allows you to run a command so that you can do something with the backup. I would be interested in using a program that does this on a more general basis:

For example I could set up a "link" to download the newest  Keepass database from ftp before running the Keepass program (synchronisation) and upload it again afterwards.

Ideally It would be good if it worked with a list of entries, each entry specifying program and the commands it should run before / after. This is easier to maintain then something decentralised.
Ideally it would still allow you to run a program the usual way (run Keepass from the start menu and FARR). I guess it would intercept the run call or modify the shortcut or some other clever way.
I guess that some people would want to run more than one command, although of course you could just run a script or batch file.

Hopefully this sparks someone's interest or someone could point me to a similar program.

« Last Edit: April 24, 2007, 06:35:30 AM by justice »


  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,258
    • View Profile
    • Coding Snacks by Lanux128
    • Read more about this member.
    • Donate to Member
Re: IDEA: Run Before / After something
« Reply #1 on: May 21, 2007, 12:14:19 AM »
there used to be a program called Omni Shortcut that is able to do this but i can't find it anymore.. however for simple, sequential execution of programs, i use Batchrun.. btw, this freeware is no longer in active development.. :huh:


also, there's always the "Start /w" command.. :)
To start programs sequentially in Windows, create a text file containing the following lines:
start /w <program1.exe>
start /w <program2.exe>
start /w <program3.exe>
<additional lines as necessary>

Save the text file with a .bat extension.


  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,898
    • View Profile
    • Donate to Member
Re: IDEA: Run Before / After something
« Reply #2 on: May 21, 2007, 07:01:13 AM »
Thanks Lanux128. An alternative also would be to make an autohotkey script and use RunWait. I was hoping there would have been a program that would detect program x was started, instead started y, then started x, and afterwards start z.
The benefit of this would be that I can just keep running X as normal, or via file associations etc.

However the more I think about it, the more this seems to be impossible, also Windows might not like it, basically you're creating a dodgy piece of software. :)


  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 886
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: Run Before / After something
« Reply #3 on: May 22, 2007, 08:20:27 PM »
:) Here's something that may work.

PauseProcess - Pause a program and run other programs before and after.

Command line:
  PauseProcess.exe "<program to pause>" ["<program to run before>" "<program to run after>"]
  PauseProcess.exe "Notepad.exe" "Pbrush.exe" "Calc.exe"

Uses PauseP.exe by Daniel Turion at http://www.codeproje...m/threads/pausep.asp

You'll find the downloads and more info at 1 Hour Software by Skrommel.

It would be possible to make a real interception using hooks, but a pause is much simpler.
The author of PauseP.exe warns that it may crash multithreaded apps.

Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.
« Last Edit: May 22, 2007, 08:24:48 PM by skrommel »