杉宫竹苑工作室

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 1728|回复: 0

获取安装进度方法

[复制链接]
发表于 2017-2-23 20:56:22 | 显示全部楼层 |阅读模式

正式会员享受无限制浏览网站功能和高速网盘下载,赶快加入本站吧!

您需要 登录 才可以下载或查看,没有账号?立即注册

x

  1. !include "LogicLib.nsh"
  2. !include "Timer.nsh"

  3. Var HPB

  4. SetCompress off

  5. Name "Test"
  6. OutFile "Setup.exe"
  7. InstallDir "$PROGRAMFILES\Test"

  8. ShowInstDetails show
  9. SetCompress off

  10. Page directory
  11. Page instfiles "" Func

  12. Section "Setup" SEC01
  13.   SetOutPath "$INSTDIR"
  14.   SetOverwrite off
  15.   Sleep 1000
  16.   File /r "自己添加文件\*.*"
  17. SectionEnd

  18. Function PB
  19.   SendMessage $HPB 1032 0 0 $0
  20.   IntOp $0 $0 / 300
  21.   ${If} $0 != 100
  22.   DetailPrint "进度:  $0%"
  23.   ${Else}
  24.   DetailPrint "进度:  $0%"
  25.   ${TMR_KillTimer} PB
  26.   ${EndIf}
  27. FunctionEnd

  28. Function Func
  29.   FindWindow $0 "#32770" "" $HWNDPARENT
  30.   GetDlgItem $HPB $0 1004
  31.   ${TMR_CreateTimer} PB 1
  32. FunctionEnd
复制代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|手机版|Archiver|SgzyStudio

GMT+8, 2024-5-19 17:02 , Processed in 0.105240 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表