cleric1985_n, могу предложить лишь перепакованную версию... Без ассоциаций/с ассоциациями по-умолчанию
Вот скрипт NSIS, с ассоциациями по-умолчанию:
читать дальше »
Код:
; Script generated by the HM NIS Edit Script Wizard.
; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "DVD X Player 5.3 Pro"
!define PRODUCT_VERSION "5.3.4"
!define PRODUCT_PUBLISHER "Installer builded by Habetdin"
!define PRODUCT_WEB_SITE "http://forum.oszone.net/member.php?userid=150730"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
!define Branding "—— Compiled by Habetdin"
SetCompressor /SOLID lzma
; MUI 1.67 compatible ------
!include "MUI.nsh"
!include "FileAssociation.nsh"
; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "ico\install.ico"
!define MUI_UNICON "ico\un.ico"
; Welcome page
!insertmacro MUI_PAGE_WELCOME
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
!insertmacro MUI_PAGE_FINISH
; Uninstaller pages
!insertmacro MUI_UNPAGE_INSTFILES
; Language files
!insertmacro MUI_LANGUAGE "Russian"
; Reserve files
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
; MUI end ------
BrandingText "${Branding}"
Name "${PRODUCT_NAME}"
OutFile "DVDXPlayerSetupPro_${PRODUCT_VERSION}.exe"
InstallDir "$PROGRAMFILES\DVD X Studios\DVD X Player 5.3 Professional"
ShowInstDetails show
ShowUnInstDetails show
Section "MainSection" SEC01
SetOutPath "$INSTDIR"
File /r "App\*.*"
SetOutPath "$SYSDIR"
SetOverwrite ifnewer
File /r "Sys\*.*"
CreateDirectory "$SMPROGRAMS\Мультимедиа\${PRODUCT_NAME}"
CreateShortCut "$SMPROGRAMS\Мультимедиа\${PRODUCT_NAME}\${PRODUCT_NAME}.lnk" "$INSTDIR\DVDXPlayer.exe"
CreateShortCut "$SMPROGRAMS\Мультимедиа\${PRODUCT_NAME}\Справка.lnk" "$INSTDIR\Help.chm"
RegDLL "$SYSDIR\Mpeg2Data.ax"
RegDLL "$SYSDIR\mpg2splt.ax"
RegDLL "$SYSDIR\MSDvbNP.ax"
RegDLL "$SYSDIR\psisrndr.ax"
RegDLL "$SYSDIR\psisdecd.dll"
SectionEnd
Section -AdditionalIcons
CreateShortCut "$SMPROGRAMS\Мультимедиа\${PRODUCT_NAME}\Удалить ${PRODUCT_NAME}.lnk" "$INSTDIR\uninst.exe"
SectionEnd
Section -Post
${registerExtension} "$INSTDIR\DVDXPlayer.exe" ".avi" "DVDXPlayer.Video"
${registerExtension} "$INSTDIR\DVDXPlayer.exe" ".vob" "DVDXPlayer.Video"
${registerExtension} "$INSTDIR\DVDXPlayer.exe" ".dat" "DVDXPlayer.Video"
${registerExtension} "$INSTDIR\DVDXPlayer.exe" ".mpg" "DVDXPlayer.Video"
${registerExtension} "$INSTDIR\DVDXPlayer.exe" ".mpe" "DVDXPlayer.Video"
${registerExtension} "$INSTDIR\DVDXPlayer.exe" ".mpeg" "DVDXPlayer.Video"
${registerExtension} "$INSTDIR\DVDXPlayer.exe" ".ac3" "DVDXPlayer.Audio"
WriteUninstaller "$INSTDIR\uninst.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\DVDXPlayer.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
SectionEnd
Function un.onUninstSuccess
HideWindow
MessageBox MB_ICONINFORMATION|MB_OK "Удаление программы $(^Name) было успешно завершено."
FunctionEnd
Function un.onInit
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Вы уверены в том, что желаете удалить $(^Name) и все компоненты программы?" IDYES +2
Abort
FunctionEnd
Section Uninstall
ExecWait "$INSTDIR\CallFileAssoc.exe /Un"
${unregisterExtension} ".avi" "DVDXPlayer.Video"
${unregisterExtension} ".vob" "DVDXPlayer.Video"
${unregisterExtension} ".dat" "DVDXPlayer.Video"
${unregisterExtension} ".mpg" "DVDXPlayer.Video"
${unregisterExtension} ".mpe" "DVDXPlayer.Video"
${unregisterExtension} ".mpeg" "DVDXPlayer.Video"
${unregisterExtension} ".ac3" "DVDXPlayer.Video"
RMDir /r "$INSTDIR"
RMDir /r "$SMPROGRAMS\Мультимедиа\${PRODUCT_NAME}"
RMDir "$SMPROGRAMS\Мультимедиа"
DeleteRegKey HKCU "Software\DVDXStudios\DVDXPlayer Professional"
DeleteRegKey /ifempty HKCU "Software\DVDXStudios"
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
SetAutoClose true
SectionEnd
P.S.: для регистрации ассоциаций используется FileAssociation.nsh, найти можно
тут