Scripting 如何在启动应用程序之前运行Windows shell脚本?

Scripting 如何在启动应用程序之前运行Windows shell脚本?,scripting,shortcuts,windows-scripting,Scripting,Shortcuts,Windows Scripting,是否有方法配置应用程序快捷方式,以便在启动应用程序之前运行Windows shell脚本?在我的例子中,我想在应用程序运行之前备份一些文件 谢谢 您可以将应用程序快捷方式更改为实际运行shell脚本,只需在脚本末尾添加一个START命令,以便脚本完成后运行程序 IE:将记事本快捷方式从%SYSTEMROOT%\Windows\notepad.exe更改为c:\launchNotepad.bat,并使launchNotepad.bat类似于 COPY importantfile.txt impor

是否有方法配置应用程序快捷方式,以便在启动应用程序之前运行Windows shell脚本?在我的例子中,我想在应用程序运行之前备份一些文件


谢谢

您可以将应用程序快捷方式更改为实际运行shell脚本,只需在脚本末尾添加一个START命令,以便脚本完成后运行程序

IE:将记事本快捷方式从%SYSTEMROOT%\Windows\notepad.exe更改为c:\launchNotepad.bat,并使launchNotepad.bat类似于

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

您可以将应用程序快捷方式更改为实际运行shell脚本,只需在脚本末尾添加一个START命令,以便脚本完成后运行程序

IE:将记事本快捷方式从%SYSTEMROOT%\Windows\notepad.exe更改为c:\launchNotepad.bat,并使launchNotepad.bat类似于

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