Hello,
After further testing this, it seems that it is not possible to have the
"PlayAudioFile" custom action as a custom action
with sequence, scheduled on the Wizard Dialogs Stage (in this case, after the Finish Dialogs Stage).
I have added this improvement on our TODO list and hopefully this will be available starting with a future version of Advanced Installer.
Unfortunately, as for this moment, I am afraid I can not give you any estimation on when this will be implemented. Thank you for your understanding.
However, after further investigating this, I was able to develop a custom action which can play your MP3 file at the end of the installation (during the "Finish Dialogs Stage").
In order to implement this, you can proceed as it follows:
1. Add the MP3 file as a temporary file in the "Files and Folders" page.
2. After doing so, double click on it and:
a. check the "Do not remove the file when setup ends"
b. copy its property (simply copy what is written in the "Property" field)
3. Go to
"Custom Actions" page
4. Add a
"PowerShellScriptInline" custom action, with sequence, by pressing the
"Add custom action with sequence" button which is placed to the right side of the custom action's name.
5. Schedule it during the
"Finish Dialogs Stage"
6. In the "
Parameters" field, copy the following line:
Code: Select all
-path "[THE_PROPERTY_YOU_HAVE_EARLIER_COPIED]"
7. The script should look like this:
Code: Select all
# Block for declaring the script parameters.
Param($path)
# Your code goes here.
Add-Type -AssemblyName PresentationCore
Add-Type -AssemblyName PresentationFramework
$song = New-Object System.Windows.Media.MediaPlayer
$song.Open($path)
$song.Play()
Start-Sleep -s 3
$Song.Stop()
You can modify the seconds (depending on how much you want the song to be played.
Hope this helps.
Best regards,
Catalin