Welcome Guest.   Make a donation to an author on the site December 18, 2014, 05:31:53 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Your Support Funds this Site: View the Supporter Yearbook.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: IDEA: Run Before / After something  (Read 10422 times)
justice
Supporting Member
**
Posts: 1,890



Solve issues simply.

View Profile WWW Give some DonationCredits to this forum member
« 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.

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

lanux128
Global Moderator
*****
Posts: 6,136



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« 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


http://www.donationcoder....um/index.php?topic=6492.0

also, there's always the "Start /w" command.. smiley
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

Logged

justice
Supporting Member
**
Posts: 1,890



Solve issues simply.

View Profile WWW Give some DonationCredits to this forum member
« 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. smiley
Logged

skrommel
Fastest code in the west
Developer
***
Posts: 884



View Profile WWW Give some DonationCredits to this forum member
« Reply #3 on: May 22, 2007, 08:20:27 PM »

smiley 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
« Last Edit: May 22, 2007, 08:24:48 PM by skrommel » Logged

Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.036s | Server load: 0 ]