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
THE END
暂无评论内容