NSIS安装包制作之消除边框、无边框移动、检查重复运行

1、消除边框

    System::Call `user32::SetWindowLong(i$HWNDPARENT,i${GWL_STYLE},0x9480084C)i.R0`

2、无边框移动
Function onGUICallback
  ${If} $MSG = ${WM_LBUTTONDOWN}
    SendMessage $HWNDPARENT ${WM_NCLBUTTONDOWN} ${HTCAPTION} $0
  ${EndIf}
FunctionEnd

3、检查重复运行
  System::Call 'kernel32::CreateMutexA(i 0, i 0, t "MicroSetup") i .r1 ?e'
  Pop $R1
  StrCmp $R1 0 +3
  MessageBox MB_OK|MB_ICONINFORMATION|MB_TOPMOST "The program is already running."
  Abort

你可能感兴趣的:(//NSIS,//Windows)