Function initializesetup (): Boolean;
VaR path: string;
Resultcode: integer;
Begin
If regkeyexists (HKLM, 'Software \ Microsoft \. netframework \ Policy \ V2.0 ') then
Begin
Result: = true;
End
Else
Begin
If msgbox ('the system detects that you have not installed. Net framework2.0, do you want to download and install it now? ', Mbconfirmation, mb_yesno) = idyes then
Begin
Path: = expandconstant ('{pf} \ Internet Explorer \ iexplore.exe ');
Exec (path, 'HTTP: // www.xxx.com/down/dotnetfx2.exe', '', sw_shownormal, ewwaituntilterminated, resultcode );
Msgbox ('Install the. NET framework2.0 environment and then run the installation package. Program ! ', Mbinformation, mb_ OK );
Result: = false;
End
Else
Begin
Msgbox ('the. Net framework2.0 environment is not installed and the xxx program cannot be run. This installer is about to exit! ', Mbinformation, mb_ OK );
Result: = false;
End;
End;
End;
[Setup]
Appname = moneymanage
Appvername = moneymanage_zh 1.1.3
Defaultdirname = {pf} \ moneymanage \ Standalone
Defaultgroupname = moneymanage Standalone
Uninstalldisplayicon = {app} \ moneymanage.exe
Compression = lzma
Solidcompression = Yes
[Files]
Source: "F: \ moneymanage \ bin \ debug \ moneymanage.exe"; destdir: "{app}"; flags: ignoreversion
Source: "F: \ moneymanage \ bin \ debug \ accessdata \ money. mdb"; destdir: "{app} \ accessdata"; flags: onlyifdoesntexist
[Icons]
Name: "{group} \ moneymanage"; filename: "{app} \ moneymanage.exe"
Name: "{group} \ Uninstall moneymanage"; filename: "{uninstallexe }"
Name: "{userdesktop} \ moneymanage"; filename: "{app} \ moneymanage.exe"; workingdir: "{app}"; tasks: "desktopicon ";
[Tasks]
Name: "Your topicon"; Description: "create a program icon (& D) on the desktop"; groupdescription: "Additional icon ";
[Ages]
Name: "ZH"; messagesfile: "compiler: Default. isl"
[Code]
Function checkdotnet2_0 (): Boolean;
Begin
Result: = Not regkeyexists (HKLM, 'Software \ Microsoft \. netframework \ Policy \ V5.0 ');
End;
Function initializesetup (): Boolean;
VaR path: string;
Resultcode: integer;
Begin
If checkdotnet2_0 () then
Begin
If msgbox ('the system detects that you have not installed. Net framework2.0, do you want to download and install it now? ', Mbconfirmation, mb_yesno) = idyes then
Begin
Extracttemporaryfile('dotnetfx40_full_setup.exe ');
Exec (expandconstant ('{TMP} \ dotnetfx40_full_setup.exe'), ',', sw_shownormal, ewwaituntilterminated, resultcode );
End;
End;
End;
Previewmousedoubleclick = "dgmoneypay_selectionchanged"
1. How to make the "I agree" button selected by default on the "protocol license" Page
[Code]
Procedure initializewizard ();
Begin
Wizardform. licenseacceptedradio. Checked: = true;
End;
2. Customize the image size in the upper-right corner of the installer
[Code]
Procedure initializewizard ();
Begin
Wizardform. wizardsmallbitmapimage. Width: = 150; // you can specify the size of the header image.
Wizardform. wizardsmallbitmapimage. Left: = wizardform. Width-150; // you can specify the gaps in the left header.
Wizardform. pagenamelabel. Width: = 0; // you can specify the title text size.
Wizardform. pagedescriptionlabel. Width: = 0; // you can specify the title text size.
End;
Or
// Small image of the custom installation wizard
[Code]
Procedure initializewizard ();
Begin
Wizardform. wizardsmallbitmapimage. Left: = wizardform. Width-164; // you can specify the position of the Installation Wizard image.
Wizardform. wizardsmallbitmapimage. Width: = 164; // customize the width of the image in the installation wizard.
Wizardform. pagenamelabel. Width: = 495-164-36; // The value must be defined here. The value is changed based on the image width to display the position of the software name.
Wizardform. pagedescriptionlabel. Width: = 495-164-42; // the location where the page information is displayed.
End;
3. Custom beveledlabel displayCode
[Code]
Procedure initializewizard ();
Begin
Wizardform. beveledlabel. Enabled: = true; // show
Wizardform. beveledlabel. Font. Color: = $00058451; // display color
Wizardform. beveledlabel. Font. Style: = wizardform. beveledlabel. Font. Style + [fsbold]; // display font
Wizardform. beveledlabel. Left: = 5; // display position
End;
4. Custom Installation Wizard Image
[Code]
procedure initializewizard ();
begin
wizardform. welcomelabel1.left: = 18; // custom welcome page title 1 display position
wizardform. welcomelabel2.left: = 18; // custom welcome page title 2 display position
wizardform. wizardbitmapimage. left: = wizardform. width-164 // custom installation wizard image display position (display size, which is displayed on the right)
end;