| 
 | 
 本帖最后由 nttwqz 于 2023-10-14 22:16 编辑  
- !include "MUI2.nsh"
 
 - !include "LogicLib.nsh"
 
 - !include "x64.nsh"
 
 - !define PRODUCT_NAME "RunExe"
 
  
- Name "${PRODUCT_NAME}"
 
 - Caption "${PRODUCT_NAME}"
 
 - OutFile "${PRODUCT_NAME}.exe"
 
  
- BrandingText " "
 
 - ManifestDPIAware true
 
 - XPStyle on
 
 - ShowInstDetails show
 
 - SetFont "Microsoft YaHei" 9
 
 - SetCompressor /FINAL /SOLID lzma
 
 - SilentInstall silent    # 静默模式,无任何界面,注释掉显示界面
 
  
- ; 定义程序图标,源文件所在路径的exe.ico
 
 - ; !define MUI_ICON "exe.ico"
 
  
- !insertmacro MUI_PAGE_INSTFILES
 
 - !insertmacro MUI_LANGUAGE "SimpChinese"
 
  
- Section
 
 -     ${If} ${IsNativeAMD64}
 
 -     ${OrIf} ${IsWow64}
 
 -         ${DisableX64FSRedirection}
 
 -     ${EndIf}
 
 -     ; 可理解成切换到当前程序所在文件夹
 
 -     SetOutPath "$EXEDIR"
 
 -     ; 不等待运行,可以非完整路径
 
 -     Exec "test.exe"
 
 -     ; 运行test.exe并等待
 
 -     ExecWait "test.exe"
 
 -     ; 隐藏运行并等待程序所在目录\000\test.bat
 
 -     nsExec::Exec "$EXEDIR\000\test.bat"
 
 - SectionEnd
 
 
  复制代码 
 
NSIS从这里下载,文件编码GBK、GB2312 
https://nsis.sourceforge.io/Main_Page |   
 
 
 
 |