Home > Back-end >  Software installation interface and how music is done.
Software installation interface and how music is done.

Time:10-28

Recently, I found that others have music playing in the installation of the software, interface also put a picture, don't know how to get, I hope will get give me some directions, thank you (QQ: 2227411448)

CodePudding user response:

Nno Setup how to play the music while installing

In the script compiler [Code] and [Files] place to add the following Code:
[Code]
The Function McISendString (lpszCommand: String; LpszReturnString: Integer; CchReturnLength: Integer; HwndCallback: Integer) : Integer;
External '[email protected] stdcall';

Procedure InitializeWizard ();
Var
BGMusicFile SplashFile: string;
SplashForm: TForm;
SplashFileName: String;
I: Integer;
The begin

ExtractTemporaryFile (ExtractFileName (ExpandConstant (' {TMP} \ music mp3 ')));
SplashForm:=TForm. Create (nil);
With SplashForm do
The begin
McISendString (ExpandConstant (' play {TMP} \ music mp3 '), 0, 0).
Close;
Free;
end;
end;
[Files]
Source: "C: \ music mp3"; Flags: dontcopy
Or
Source: "C: \ up mymusic mp3"; DestDir: "{TMP}"; Flags: dontcopy
Code: {TMP} [Code] Code with the \ music mp3 mean play inno setup installation is created when the temporary folder of music. Mp3 music files.

Note: the path and the music file name must be correct, otherwise can not find,

CodePudding user response:

Inno setup5.0
  • Related