答案1
该脚本将抑制警告(它将单击“运行”)。
@ECHO OFF
REM External app to launch
CALL E:\file_from_external_location.exe
REM Make a VBS-script that will switch to the warning and press "Run"
ECHO ^
CreateObject("WScript.Shell").AppActivate "Open File - Security Warning"^
WScript.Sleep 500^
CreateObject("WScript.Shell").SendKeys "%%R"^
>vbs.vbs
CALL vbs.vbs
DEL vbs.vbs
不确定这些是否有必要。如果我从脚本调用应用程序,似乎没有任何关于打开程序的警告。
REM External app to launch
CALL E:\file_from_external_location.exe