ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA: Run Before / After something

(1/1)

justice:
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.

ideallyIdeally 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.
Thanks!

lanux128:
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:


https://www.donationcoder.com/forum/index.php?topic=6492.0

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. http://support.microsoft.com/kb/198044

justice:
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. :)

skrommel:
:) 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>"]
Example:
  PauseProcess.exe "Notepad.exe" "Pbrush.exe" "Calc.exe"

Uses PauseP.exe by Daniel Turion at http://www.codeproject.com/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.

Skrommel

Navigation

[0] Message Index

Go to full version