Question
How can I play a system sound to get the user's attention?
Answer
You can use the PlaySound function, found in winmm.dll, to play the configured system sounds.
To play the "Exclamation" sound when displaying a certain screen in your installer, you can use Lua code like this in the On Preload script:
The attached sample project for Setup Factory 9 shows how to play a system sound.
How can I play a system sound to get the user's attention?
Answer
You can use the PlaySound function, found in winmm.dll, to play the configured system sounds.
To play the "Exclamation" sound when displaying a certain screen in your installer, you can use Lua code like this in the On Preload script:
Code:
DLL[COLOR="#FF0000"].[/COLOR]CallFunction(_SystemFolder[COLOR="#FF0000"]..[/COLOR][COLOR="#800080"]"[COLOR="#800080"]\\[/COLOR]winmm.dll"[/COLOR][COLOR="#FF0000"],[/COLOR] [COLOR="#800080"]"PlaySound"[/COLOR][COLOR="#FF0000"],[/COLOR] [COLOR="#800080"]"[COLOR="#800080"]\"[/COLOR]SystemExclamation[COLOR="#800080"]\"[/COLOR],0,65536"[/COLOR][COLOR="#FF0000"],[/COLOR] DLL_RETURN_TYPE_INTEGER[COLOR="#FF0000"],[/COLOR] DLL_CALL_STDCALL);