最新消息:

NSIS自动改变桌面主题

nsis 永恒心锁 2176浏览 0评论
Name "ChangeStyleXP"
OutFile "ChangeStyleXP.exe"
!include "FileFunc.nsh"
!insertmacro GetFileName
!define BM_CLICK 0x00F5
!define WM_CLOSE 0x0010
Section
IfFileExists "$WINDIRResourcesThemesWindows Classic.theme" 0 error
ExecShell 'open' '$WINDIRResourcesThemesWindows Classic.theme'
FindWindow $0 '#32770' '' $HWNDPARENT
StrCpy $3 0
wait:
IntOp $3 $3 + 1
StrCmp $3 50 error
Sleep 100
System::Call 'user32::GetForegroundWindow()i .r1'
StrCmp $0 $1 wait
System::Call 'user32::GetWindowModuleFileName(i r1, t .r2, i ${NSIS_MAX_STRLEN})'
${GetFileName} '$2' $2
StrCmp $2 'comctl32.dll' 0 wait
HideWindow
System::Call 'user32::SetWindowPos(i $1,i 0,i 0,i 0,i 0,i 0,i 0)'
GetDlgItem $2 $1 1
SendMessage $2 ${BM_CLICK} 0 0
 BringToFront
MessageBox MB_OK "Success" IDOK quit
error:
MessageBox MB_OK "Error"
quit:
quit
SectionEnd
永恒心锁,版权所有丨如未注明,均为转载丨本网站采用BY-NC-SA协议进行授权

转载请注明:永恒心锁-分享互联网 » NSIS自动改变桌面主题

您必须 登录 才能发表评论!