views:

82

answers:

1

Is there a way to configure an application shortcut so that a Windows shell script is run prior to kicking off the application? In my case, I want to back-up some files before the application runs.

Thanks!

+7  A: 

You could change the application shortcut to actually run the shell script and just add a START command to the end of the script so it runs the program once complete.

IE: change the notepad shortcut from %SYSTEMROOT%\Windows\Notepad.exe to c:\launchNotepad.bat and have launchnotepad.bat be something like

COPY importantfile.txt importantfile.txt.bak
START %SYSTEMROOT%\Windows\Notepad.exe importantfile.txt
Mitch