~cpp Makensis [/Vx] [/Olog] [/LICENSE] [/PAUSE] [/NOCONFIG] [/CMDHELP [command]] [/HDRINFO] [/CD] [/Ddefine[=value] ...] ["/XCommand parameter" ...] [Script.nsi | - [...]]
~cpp MessageBox MB_OK "I'll be happy" ; this one puts a ' inside a string MessageBox MB_OK 'And he said to me "Hi there!"' ; this one puts a " inside a string MessageBox MB_OK `And he said to me "I'll be fucked!"` ; this one puts both ' and "s inside a string:
~cpp CreateShortCut "$SMPROGRAMS\NSIS\ZIP2EXE project workspace.lnk" \ "$INSTDIR\source\zip2exe\zip2exe.dsw" MessageBox MB_YESNO|MB_ICONQUESTION \ "Remove all files in your NSIS directory? (If you have anything \ you created that you want to keep, click No)" \ IDNO NoRemoveLabel
~cpp ;copy files File /r `.\tmp\*.*` ;system32 에 복사해줄 dll 들도 일단 복사해준다. File /r `.\AdditionalDLL\*.dll` ;move system addtinoal dlls to system folder Rename "$INSTDIR\MSVCP60.dll" "$SYSDIR\MSVCP60.dll"
~cpp Section "ThisNameIsIgnoredSoWhyBother?" . . MessageBox MB_OK "$WINDIR" MessageBox MB_OK "$SYSDIR" ; 복사할 화일을 추가하기. SectionEnd ; section 완료
~cpp Exec 'regsvr32.exe /u /s "$INSTDIR\COMDLL.dll"' waitloop: FindProcDLL::FindProc "regsvr32.exe" IntCmp $R0 0 waitdone Sleep 500 Goto waitloop waitdone: Delete "$INSTDIR\*.*" RMDir /r "$INSTDIR"
~cpp ;Inside the -Post section Exec 'regsvr32.exe /s "$INSTDIR\${NAME_OF_MY_DLL}"' ;And Inside the Uninstall Section Exec 'regsvr32.exe /s /u "$INSTDIR\${NAME_OF_MY_DLL}"'
~cpp ;-------------------------------- ;Uninstaller Section Section "Uninstall" ;Delete Files RMDir /r "$INSTDIR\*.*" ;Remove the installation directory RMDir "$INSTDIR" ;Delete Start Menu Shortcuts Delete "$DESKTOP\${MUI_PRODUCT}.lnk" Delete "$SMPROGRAMS\${MUI_PRODUCT}\*.*" RmDir "$SMPROGRAMS\${MUI_PRODUCT}" ;Delete Uninstaller And Unistall Registry Entries DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\${MUI_PRODUCT}" DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${MUI_PRODUCT}" SectionEnd Section "" . . . ;레지스트리에 uninstall 프로그램 셋팅해주는 부분 ;write uninstall information to the registry WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${MUI_PRODUCT}" "DisplayName" "${MUI_PRODUCT} (remove only)" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${MUI_PRODUCT}" "UninstallString" "$INSTDIR\Uninstall.exe" ; Uninstaller 를 만드는 부분 WriteUninstaller "$INSTDIR\Uninstall.exe" SectionEnd