杉宫竹苑工作室

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

NSIS自动改变桌面主题

[复制链接]
发表于 2019-3-1 22:04:28 | 显示全部楼层 |阅读模式

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

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

x
  1. Name "ChangeStyleXP"
  2. OutFile "ChangeStyleXP.exe"
  3. !include "FileFunc.nsh"
  4. !insertmacro GetFileName
  5. !define BM_CLICK 0x00F5
  6. !define WM_CLOSE 0x0010
  7. Section
  8. IfFileExists "$WINDIRResourcesThemesWindows Classic.theme" 0 error
  9. ExecShell 'open' '$WINDIRResourcesThemesWindows Classic.theme'
  10. FindWindow $0 '#32770' '' $HWNDPARENT
  11. StrCpy $3 0
  12. wait:
  13. IntOp $3 $3 + 1
  14. StrCmp $3 50 error
  15. Sleep 100
  16. System::Call 'user32::GetForegroundWindow()i .r1'
  17. StrCmp $0 $1 wait
  18. System::Call 'user32::GetWindowModuleFileName(i r1, t .r2, i ${NSIS_MAX_STRLEN})'
  19. ${GetFileName} '$2' $2
  20. StrCmp $2 'comctl32.dll' 0 wait
  21. HideWindow
  22. System::Call 'user32::SetWindowPos(i $1,i 0,i 0,i 0,i 0,i 0,i 0)'
  23. GetDlgItem $2 $1 1
  24. SendMessage $2 ${BM_CLICK} 0 0
  25. BringToFront
  26. MessageBox MB_OK "Success" IDOK quit
  27. error:
  28. MessageBox MB_OK "Error"
  29. quit:
  30. quit
  31. SectionEnd
复制代码


回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-1 04:26 , Processed in 0.102397 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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