Iron DLL Plugins Injector
Posted: Sat Jan 29, 2011 6:59 am
Code: Select all
; WELCOME in Source code...
; SFX Plugin Injector with NSIS
; use HM NIS Edit Script Wizard -> http://hmne.sourceforge.net/
; and always combo with NSIS -> http://nsis.sourceforge.net/
; put files -> npswf32.dll & np-mswmp.dll in same folder with this text
; to make instant compiling [in same folder] example -> "F:\PROJECT\npswf32.dll" & "F:\PROJECT\np-mswmp.dll"
; save this text example -> "F:\PROJECT\Plugin Injector.nsi"
; IDM 5.1x is obsolete ~disabled, use -> DM-Bridge (oGet for Chrome, windows only) Chrome Ext.
; Helper defines
!define PRODUCT_NAME "SRWare Iron - DLL Plugins"
!define PRODUCT_VERSION "0.0.0.1"
!define PRODUCT_COPYRIGHT "Copyleft :) 2o11"
!define PRODUCT_PUBLISHER "SRWare Iron Forum"
!define PRODUCT_DESCRIPTION "SRWare Iron - DLL Plugins Injector for Windows XP/2003/Vista/2008/7 (npswf32.dll & np-mswmp.dll & etc.)"
!define PRODUCT_SOURCE_FILE0 "Plugin Injector.nsi"
!define PRODUCT_SOURCE_FILE1 "npswf32.dll"
!define PRODUCT_SOURCE_FILE2 "np-mswmp.dll"
; disabled
;!define PRODUCT_SOURCE_FILE3 "NP_IDM1.dll"
;!define PRODUCT_SOURCE_FILE4 "NP_IDM2.dll"
;!define PRODUCT_SOURCE_FILE5 "NP_IDM3.dll"
;!define PRODUCT_SOURCE_FILE6 "NP_IDM4.dll"
;!define PRODUCT_SOURCE_FILE7 "NP_IDM5.dll"
;!define PRODUCT_SOURCE_FILE8 "npdeployJava1.dll"
;!define PRODUCT_SOURCE_FILE9 "~~~~~~~.dll"
;!define PRODUCT_SOURCE_FILE10 "~~~~~~~.dll"
;!define PRODUCT_SOURCE_FILE11 "~~~~~~~.dll"
;=======
; Settings
;=======
AutoCloseWindow True
SilentInstall normal
CRCCheck on
;=======
; Compression, SetCompressorDictSize enabled, add ";" mark in first to disabling
;=======
SetCompressor /SOLID lzma
SetDatablockOptimize On
SetCompressorDictSize 32
;=======
; Name, Install folder, Version and Icon
; Use default Install folder "$PROGRAMFILES\SRWare Iron\Plugins"
;=======
Name "${PRODUCT_NAME}"
OutFile "Setup.exe"
LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf"
VIProductVersion "${PRODUCT_VERSION}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "${PRODUCT_NAME}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "${PRODUCT_PUBLISHER}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "${PRODUCT_DESCRIPTION}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "${PRODUCT_COPYRIGHT}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${PRODUCT_VERSION}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "PrivateBuild" ""
VIAddVersionKey /LANG=${LANG_ENGLISH} "SpecialBuild" ""
VIAddVersionKey /LANG=${LANG_ENGLISH} "InternalName" ""
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "SRWARE Iron - Plugins Injector is a copyleft :)"
InstallDir "$PROGRAMFILES\SRWare Iron\Plugins"
Icon "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
UninstallIcon "${NSISDIR}\Contrib\Graphics\Icons\win-uninstall.ico"
DirText "Setup will install $(^Name) in the following folder.$\r$\n$\r$\nTo install in a different folder, click Browse and select another folder."
ShowInstDetails show
ShowUnInstDetails nevershow
;=======
; Installation Target
;=======
Section "MainSection" SEC01
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
File "${PRODUCT_SOURCE_FILE0}"
File "${PRODUCT_SOURCE_FILE1}"
File "${PRODUCT_SOURCE_FILE2}"
;=======
;IDM support disabled, remove ";" mark to enabling
;=======
; File "${PRODUCT_SOURCE_FILE3}"
; File "${PRODUCT_SOURCE_FILE4}"
; File "${PRODUCT_SOURCE_FILE5}"
; File "${PRODUCT_SOURCE_FILE6}"
; File "${PRODUCT_SOURCE_FILE7}"
;JAVA disabled
; File "${PRODUCT_SOURCE_FILE8}"
;Others dll files
; File "${PRODUCT_SOURCE_FILE9}"
; File "${PRODUCT_SOURCE_FILE10}"
; File "${PRODUCT_SOURCE_FILE11}"
; File "etc."
SectionEnd
;=======
; Add Icon & uninstaller
;=======
Section -AdditionalIcons
CreateDirectory "$SMPROGRAMS\SRWare Iron Plugins"
CreateShortCut "$SMPROGRAMS\SRWare Iron Plugins\Uninstall.lnk" "$INSTDIR\uninst.exe"
SectionEnd
Section -Post
WriteUninstaller "$INSTDIR\uninst.exe"
SectionEnd
;=======
; Copies support currently disabled, remove ";" mark to enabling
;=======
;Section -Copy
; CopyFiles /SILENT "$PROGRAMFILES\Real\RealPlayer\Netscape6\*.dll" "$PROGRAMFILES\SRWARE Iron\Plugins"
; CopyFiles /SILENT "$PROGRAMFILES\Mozilla Firefox\plugins\*.dll" "$PROGRAMFILES\SRWARE Iron\Plugins"
; CopyFiles /SILENT "$PROGRAMFILES\Opera\program\plugins\NP_IDM*.dll" "$PROGRAMFILES\SRWARE Iron\Plugins"
;SectionEnd
Function un.onUninstSuccess
HideWindow
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
FunctionEnd
Function un.onInit
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
Abort
FunctionEnd
;=======
; Uninstall
;=======
Section Uninstall
Delete "$INSTDIR\uninst.exe"
Delete "$INSTDIR\${PRODUCT_SOURCE_FILE0}"
Delete "$INSTDIR\${PRODUCT_SOURCE_FILE1}"
Delete "$INSTDIR\${PRODUCT_SOURCE_FILE2}"
;=======
;IDM support disabled, remove ";" mark to enabling
;=======
; Delete "$INSTDIR\${PRODUCT_SOURCE_FILE3}"
; Delete "$INSTDIR\${PRODUCT_SOURCE_FILE4}"
; Delete "$INSTDIR\${PRODUCT_SOURCE_FILE5}"
; Delete "$INSTDIR\${PRODUCT_SOURCE_FILE6}"
; Delete "$INSTDIR\${PRODUCT_SOURCE_FILE7}"
;JAVA disabled
; Delete "$INSTDIR\${PRODUCT_SOURCE_FILE8}"
;=======
; Force deletion disabled, remove ";" mark to enabling
;=======
; Delete "$INSTDIR\*.DLL"
;=======
; Deletion Shortcut & Folder
;=======
Delete "$SMPROGRAMS\SRWare Iron Plugins\Uninstall.lnk"
RMDir "$SMPROGRAMS\SRWare Iron Plugins"
RMDir "$INSTDIR"
SetAutoClose true
SectionEnd
;=======
; Readme
;=======
Section -Post2
EXECSHELL open "$WINDIR\notepad.exe" "$INSTDIR\${PRODUCT_SOURCE_FILE0}"
SectionEnd
;_eof