- 积分
- 18
- 在线时间
- 17 小时
- 主题
- 11
- 注册时间
- 2014-4-18
- 帖子
- 43
- 最后登录
- 2019-3-15
- 帖子
- 43
- 软币
- 239
- 在线时间
- 17 小时
- 注册时间
- 2014-4-18
|
!system '>tmp set/p=MSCF<nul'
!packhdr temp.dat 'cmd /c Copy /b temp.dat /b +tmp&&del tmp'
!define MUI_UI "mrdc.res"
outfile "DotNetFx35.exe"
Name ".Net Framework 3.5 自动安装程序"
Caption ".Net 框架 3.5 自动安装程序"
InstallDir "$PROGRAMFILES\Dhc\Support\installer\DotNetFrameworks"
SetCompressor lzma
SetDatablockOptimize on
Icon "DotNetFx35.ico"
BrandingText " "
Page instfiles
CRCCheck off
xpstyle on
ShowInstDetails nevershow
!include "MUI.nsh"
!define MUI_ICON "DotNetFx35.ico"
!insertmacro MUI_LANGUAGE "SimpChinese"
VIProductVersion 3.5.0.0
VIAddVersionKey /LANG=2052 "FileVersion" "版本: 3.5$\r$\n发布人: liuz"
VIAddVersionKey /LANG=2052 "ProductName" ".Net Framework 3.5 自动安装程序"
VIAddVersionKey /LANG=2052 "CompanyName" "Hesung Studio"
VIAddVersionKey /LANG=2052 "LegalTrademarks" "Hesung Studio"
VIAddVersionKey /LANG=2052 "LegalCopyright" "Hesung Studio"
VIAddVersionKey /LANG=2052 "FileDescription" ".net Framework 3.5 自动安装程序"
VIAddVersionKey /LANG=2052 "Comments" ".net Framework 3.5 自动安装程序"
Function .onInit
SYSTEM::Call "kernel32::CreateMutexA(i 0, i 0, t '$(^Name)') i .r0 ?e"
Pop $0
IntCmp $0 0 0 _lab_exit
ReadRegDWORD $0 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5" "Install"
StrCmp $0 1 0 _lab_begin_prompt
ReadRegDWORD $0 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0\Setup" "InstallSuccess"
StrCmp $0 1 0 _lab_begin_prompt
ReadRegDWORD $0 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727" "Install"
StrCmp $0 1 0 _lab_begin_prompt
MessageBox MB_YESNO|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON "本机已经过安装.net Framework 3.5,是否进行更新安装?" /SD IDNO IDYES _lab_begin IDNO _lab_exit
_lab_begin_prompt:
MessageBox MB_YESNO|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON "确定要安装.net Framework 3.5吗?" /SD IDYES IDNO _lab_exit
_lab_begin:
Banner::show /NOUNLOAD ".net 框架 3.5 自动安装程序"
Banner::getWindow /NOUNLOAD
Pop $R0
GetDlgItem $R9 $R0 1030
SendMessage $R9 ${WM_SETTEXT} 0 'STR:正在预处理.net框架3.5安装文件...'
SetOutPath $INSTDIR
;Sleep 5000
file /r "DotNetFrameworks\*"
SendMessage $R9 ${WM_SETTEXT} 0 'STR:正在安装.net框架3.5 请耐心等待...'
ExecWait '"$INSTDIR\dotNetFx35setup.exe" /q /norestart' $0
Banner::destroy
IntCmp $0 3010 0 _lab_exit
MessageBox MB_YESNO|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON ".net 3.5 需要重启计算机才能完成安装,是否重启? " /SD IDNO IDNO _lab_exit
Reboot
_lab_exit:
quit
Functionend
Section ""
sectionend
|
评分
-
查看全部评分
|