程序:打造单文件版的驱动精灵
优质
小牛编辑
138浏览
2023-12-01
主要实现的过程
无界面直接解压到指定文件夹
导入注册表
运行驱动精灵主程序
运行结束后
清除解压出来的文件
清理注册表文件
把 驱动精灵2005放到2005.DriverGenius文件夹里
无界面直接解压到指定文件夹
导入注册表
运行驱动精灵主程序
运行结束后
清除解压出来的文件
清理注册表文件
把 驱动精灵2005放到2005.DriverGenius文件夹里
引用脚本的内容:
name "驱动精灵2005" outfile '驱动精灵2005.exe' SilentInstall silent !define MUI_ICON DriverGenius.ico XPStyle on !include "MUI.nsh" !define /date DATE "%Y.%m.%d.%H" !define VER "Build ${DATE}" !insertmacro MUI_LANGUAGE "simpchinese" VIProductVersion "2007.09.10.0" VIAddVersionKey /LANG=2052 "ProductName" "驱动精灵2005" ;产品名称 VIAddVersionKey /LANG=2052 "Comments" "驱动精灵2005 By 似水年华" ;备注 VIAddVersionKey /LANG=2052 "CompanyName" "梦想吧|Dreams8" ;公司 VIAddVersionKey /LANG=2052 "梦想吧" "Http://WwW.Dreams8.CoM" ;WEB VIAddVersionKey /LANG=2052 "LegalTrademarks" "似水年华@梦想吧" VIAddVersionKey /LANG=2052 "LegalCopyright" "(C) 2006--2007 Dreams8.Com" ;版权 VIAddVersionKey /LANG=2052 "FileDescription" "梦想吧软件系列之驱动精灵2006" ;描述 VIAddVersionKey /LANG=2052 "FileVersion" "${VER}" VIAddVersionKey /LANG=2052 "OriginalFilename" "驱动精灵2005.exe" ;源文件名 Section "Dreams8drvbackup" SetOutPath "$PROGRAMFILES" File /a /r "2005.DriverGenius" WriteRegStr HKLM "SOFTWARE\Driver-Soft\DriverGenius" "Version" "5.0.1082" WriteRegDWORD HKLM "SOFTWARE\Driver-Soft\DriverGenius" "AlertMessage" 0x00000001 WriteRegDWORD HKLM "SOFTWARE\Driver-Soft\DriverGenius" "TipMessage" 0x00000000 WriteRegDWORD HKLM "SOFTWARE\Driver-Soft\DriverGenius" "Backup Settings" 0x00000000 WriteRegDWORD HKLM "SOFTWARE\Driver-Soft\DriverGenius" "Compression Level" 0x00000006 WriteRegDWORD HKLM "SOFTWARE\Driver-Soft\DriverGenius" "ShowDailyTip" 0x00000001 WriteRegDWORD HKLM "SOFTWARE\Driver-Soft\DriverGenius" "CheckUpdate" 0x00000000 WriteRegDWORD HKLM "SOFTWARE\Driver-Soft\DriverGenius" "VerifyData" 0x00000000 WriteRegDWORD HKLM "SOFTWARE\Driver-Soft\DriverGenius" "WizardMode" 0x00000000 WriteRegDWORD HKLM "SOFTWARE\Driver-Soft\DriverGenius" "ScanVirus" 0x00000000 WriteRegStr HKLM "SOFTWARE\Driver-Soft\DriverGenius" "AntiVirusSoftwareName" "" WriteRegStr HKLM "SOFTWARE\Driver-Soft\DriverGenius" "ScannerParameter" "" WriteRegDWORD HKLM "SOFTWARE\Driver-Soft\DriverGenius" "DivideVolume" 0x00000000 WriteRegDWORD HKLM "SOFTWARE\Driver-Soft\DriverGenius" "VolumeSize" 0x00000000 WriteRegStr HKLM "SOFTWARE\Driver-Soft\DriverGenius\PathMRU" "CurrentPath" "3" WriteRegStr HKLM "SOFTWARE\Driver-Soft\DriverGenius\PathMRU" "Path3" "D:\备份的驱动\" Execwait "$PROGRAMFILES\2005.DriverGenius\drivergenius.exe" RMDir /r /REBOOTOK "$PROGRAMFILES\2005.DriverGenius" DeleteRegKey HKLM "SOFTWARE\Driver-Soft" SectionEnd