Windows 下免費製作軟體安裝包工具介紹-nullsoft scriptable install systen(NSIS) (05)
Windows 下免費製作軟體安裝包工具介紹-nullsoft
scriptable install systen(NSIS) (05)
Codeproject上的教學文件: http://www.codeproject.com/Articles/24187/Creating-an-Installer
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Warning: ; This is modified version of one of ; Author is not responsible for ; cause to you by using or misusing ; ; Use it at YOUR OWN RISK. ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;Include helpful !include ;Include Modern !include !define !define !define OutFile Name InstallDir InstallDirRegKey ShowInstDetails ShowUnInstDetails SetCompressor SetCompressorDictSize ;Request application privileges for Windows RequestExecutionLevel user Section SetOutPath “$INSTDIR” ;Store installation folder WriteRegStr HKCU “Software\CP ;Create uninstaller WriteUninstaller SectionEnd Section ;ADD YOUR OWN FILES HERE… Delete “$INSTDIR\Uninstall.exe” RMDir “$INSTDIR” DeleteRegKey /ifempty HKCU SectionEnd !insertmacro !insertmacro !insertmacro !insertmacro !insertmacro !insertmacro !insertmacro !insertmacro !insertmacro !insertmacro ;——————————– ;Languages !insertmacro ;——————————– ;Descriptions ;Language strings LangString DESC_SecDummy ${LANG_ENGLISH} ;Assign language strings to sections !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT !insertmacro MUI_FUNCTION_DESCRIPTION_END Function .OnInit StrCpy $0 “Welcome to my first setup push $0 Call ShowWelcome FunctionEnd Function pop $R0 ${If} $R0 == ” StrCpy $R0 “Message from ${EndIf} MessageBox MB_OK $R0 FunctionEnd |