Cześć! Totalnie nie znam się na programowaniu, dlatego też skorzystałem z programu SFX Tool, który odwala za mnie 80% roboty. Bazuje on na Nullsoft Install System (NSIS). No i mam tu coś takiego i chciałbym, aby instalator podczas instalacji plików odtwarzał daną ścieżkę dźwiękową. Da się coś takiego wykombinować? Znalazłem dokumentacje, ale w niej nie widziałem niczego dot. mojego pytania -> http://www.pawelporwisz.pl/nsis_pl/contents.php#nsis_docs_pl
Z góry dziękuje i pozdrawiam.
# -------------------------------------------------------------------
# Define Variables
# -------------------------------------------------------------------
var STARTMENU_FOLDER
# -------------------------------------------------------------------
# Choosing Compressor
# -------------------------------------------------------------------
SetCompressor LZMA
SetCompressorDictSize 32
SetCompress Auto
SetDatablockOptimize On
# -------------------------------------------------------------------
# SFX Definitions
# -------------------------------------------------------------------
!define SFX_AppID "{A26D9186-1E14-4A80-806E-3C0B3E449285}"; a unique ID for your SFX (It's real GUID)
!define SFX_BaseDir "C:\Program Files\MuldeR's Freeware\SFX Tool v1.01"; the SFX Tool install folder - do NOT edit!
!define SFX_Title "Unnamed Product"; the installer title
!define SFX_InstallDir "$PROGRAMFILES\My Company\Foo"; the *default* destination directory
!define SFX_OutFile "C:\Users\Dawid\Desktop\testowy instalator.exe"; the file to save the installer EXE to
!define SFX_IconFile "Modern-Default"; the installer icon
!define SFX_HeaderImage "NSIS"; the herader image
!define SFX_WizardImage "Llama"; the wizard image
# -------------------------------------------------------------------
# Reserve Files
# -------------------------------------------------------------------
ReserveFile "Plugins\InstallOptions.dll"
ReserveFile "Plugins\LangDLL.dll"
ReserveFile "Plugins\StartMenu.dll"
ReserveFile "Plugins\UserInfo.dll"
ReserveFile "Contrib\Graphics\Wizard\${SFX_WizardImage}.bmp"
ReserveFile "Contrib\Graphics\Header\${SFX_HeaderImage}.bmp"
ReserveFile "Contrib\Graphics\Header\${SFX_HeaderImage}-R.bmp"
ReserveFile "Contrib\Modern UI\ioSpecial.ini"
# -------------------------------------------------------------------
# General Settings
# -------------------------------------------------------------------
XPStyle On
CRCCheck Force
ShowInstDetails Show
ShowUninstDetails Show
BrandingText "SFX Tool v1.01, NSIS v2.11"
Name "${SFX_Title}"
OutFile "${SFX_OutFile}"
InstallDir "${SFX_InstallDir}"
InstallDirRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${SFX_AppID}" "InstallDirectory"
# -------------------------------------------------------------------
# Modern Interface Settings
# -------------------------------------------------------------------
!include "MUI.nsh"
!define MUI_ICON "Contrib\Graphics\Icons\${SFX_IconFile}-Install.ico"
!define MUI_WELCOMEFINISHPAGE_BITMAP "Contrib\Graphics\Wizard\${SFX_WizardImage}.bmp"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "Contrib\Graphics\Header\${SFX_HeaderImage}.bmp"
!define MUI_HEADERIMAGE_BITMAP_RTL "Contrib\Graphics\Header\${SFX_HeaderImage}-R.bmp"
!define MUI_ABORTWARNING
!define MUI_WELCOMEPAGE_TITLE_3LINES
!define MUI_FINISHPAGE_TITLE_3LINES
!define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_LANGDLL_REGISTRY_ROOT "HKLM"
!define MUI_LANGDLL_REGISTRY_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${SFX_AppID}"
!define MUI_LANGDLL_REGISTRY_VALUENAME "InstallLanguage"
!define MUI_LANGDLL_ALWAYSSHOW
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
# -------------------------------------------------------------------
# Multi-Language Support
# -------------------------------------------------------------------
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "Spanish"
# -------------------------------------------------------------------
# Install Files Section
# -------------------------------------------------------------------
Section
SetOutPath "$INSTDIR"
File /r "C:\Users\Dawid\Desktop\testowy_pliczek.txt"
SectionEnd
# -------------------------------------------------------------------
# Registry Section
# -------------------------------------------------------------------
Section
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${SFX_AppID}" "" "${SFX_Title}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${SFX_AppID}" "InstallDirectory" "$INSTDIR"
SectionEnd
# -------------------------------------------------------------------
# Initialization Functions
# -------------------------------------------------------------------
Function .onInit
InitPluginsDir
ClearErrors
UserInfo::GetName
IfErrors RunTheInstaller
Pop $0
UserInfo::GetAccountType
Pop $1
StrCmp $1 "Admin" RunTheInstaller
StrCmp $1 "Power" RunTheInstaller
MessageBox MB_OK|MB_ICONSTOP|MB_TOPMOST "The user $\"$0$\" is not allowed to install this application.$\nPlease ask your administrator's permission !!!"
Quit
RunTheInstaller:
!insertmacro MUI_LANGDLL_DISPLAY
FunctionEnd
# ===================================================================
# End of File
# ===================================================================