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:
It's a little weird, I know, but oh well.
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
MyLabel:Labels cannot begin with a - or 0-9. When specifying labels for the various instructions that require them, remember that both an empty string ("") and 0 both represent the next instruction (meaning no Goto will occur).
Section "Uninstall"
Delete $INSTDIR\Uninst.exe ; delete self (see explanation below why this works)
Delete $INSTDIR\myApp.exe
RMDir $INSTDIR
DeleteRegKey HKLM SOFTWARE\myApp
SectionEnd
The first Delete instruction works (deleting the uninstaller), because the uninstaller is transparently copied to the system temporary directory for the uninstall.
Function .onInit
MessageBox MB_YESNO "This will install. Continue?" IDYES NoAbort
Abort ; causes installer to quit.
NoAbort:
FunctionEnd
or:
Function .onInit
ReadINIStr $INSTDIR $WINDIR\wincmd.ini Configuration InstallDir
StrCmp $INSTDIR "" 0 NoAbort
MessageBox MB_OK "Windows Commander not found. Unable to get install path."
Abort ; causes installer to quit.
NoAbort:
FunctionEnd
Function .onUserAbort
MessageBox MB_YESNO "Abort install?" IDYES NoCancelAbort
Abort ; causes installer to not quit.
NoCancelAbort:
FunctionEnd
Function .onInstSuccess
MessageBox MB_YESNO "Congrats, it worked. View readme?" IDNO NoReadme
Exec notepad.exe ; view readme or whatever, if you want.
NoReadme:
FunctionEnd
Function .onInstFailed
MessageBox MB_OK "Better luck next time."
FunctionEnd
Function .onVerifyInstDir
IfFileExists $INSTDIR\Winamp.exe PathGood
Abort ; if $INSTDIR is not a winamp directory, don't let us install there
PathGood
FunctionEnd
Copyright (C) 1999-2001 Nullsoft, Inc.
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
eof (that's end of file for all you people who don't get it).