I have searched around because I want my installer to play a *.midi-file... I have tryed many diffrent functions.. but I can't get this to work! Here is something I tryed..:
Can someone please help me?
;--------------------------------
;common
!define APP_NAME "PlaySound"
!define SND_NAME "C:\Documents and Settings\User\Desktop\Song.midi"
Name "${APP_NAME}"
OutFile "${APP_NAME}.exe"
InstallDir "$PROGRAMFILES\${APP_NAME}"
;--------------------------------
;Pages, Interface Settings, Languages
SetCompressor lzma
!include "MUI.nsh"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
!define MUI_ABORTWARNING
;--------------------------------
;Installer Functions
Function .onInit
InitPluginsDir
SetOutPath "C:\Documents and Settings\User\Desktop\"
File "${SND_NAME}"
; no-loop or loop
; System::Call 'winmm.dll::PlaySoundA(t "$PLUGINSDIR\${SND_NAME}", i 0, i 0x00020003) i .R0'
System::Call 'winmm.dll::PlaySoundA(t "$PLUGINSDIR\${SND_NAME}", i 0, i 0x0002000b) i .R0'
FunctionEnd
;--------------------------------
;Installer Sections
Section "Dummy Section" SecDummy
; to stop sound at the end of INSTALL page - optional
System::Call 'winmm.dll::PlaySoundA(i 0, i 0, i 0) i .R0'
SectionEnd
Thanks!