|
#11
|
||||
|
||||
|
Start Menu Shortcut Bugs!
When I checked the start menu shortcut creator checkbox, I realized that the shortcut is not created inside the programs folder of the start menu. However it was created when I checked the desktop shortcut creator checkbox. So I fixed it like this:
Code:
//#if !CompactMode || !UpdateMode
// function CreateIconsDesktop: Boolean;
// begin
// Result := (not IsDoneError) and IconsCB.Checked;
// end;
// function IsUninstallable: Boolean;
// begin
// Result := UninstallCB.Checked;
// end;
//#endif
//#if !CompactMode
//function CreateIconsStartMenu: Boolean;
//begin
// Result := (not IsDoneError) and (not StartMenuCB.Checked);
//end;
//#endif
function CreateIconsDesktop: Boolean;
begin
Result := (not IsDoneError) and Assigned(IconsCB) and IconsCB.Checked; // your “desktop shortcut” checkbox
end;
function CreateIconsStartMenu: Boolean;
begin
Result := (not IsDoneError) and Assigned(StartMenuCB) and StartMenuCB.Checked;
end;
function IsUninstallable: Boolean;
begin
Result := Assigned(UninstallCB) and UninstallCB.Checked;
end;
procedure StartMenuCBClick(Sender: TObject);
var
CB: TNewCheckBox;
begin
if (Sender is TNewCheckBox) then CB := TNewCheckBox(Sender) else CB := StartMenuCB;
if Assigned(WizardForm) and Assigned(CB) then
begin
WizardForm.GroupEdit.Enabled := CB.Checked;
WizardForm.GroupBrowseButton.Enabled := CB.Checked;
end;
end;
Code:
StartMenuCB := TNewCheckBox.Create(WizardForm); Code:
Checked := False; // 1) set default state
OnClick := @StartMenuCBClick; // 2) wire the handler
StartMenuCBClick(StartMenuCB); // 3) Synchronize the UI to the current checkbox state
end;
__________________
Built with hustle, crowned with success. |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Help] need Advanced Installer script with Razor1911's UltraArc module | rez3vil | Conversion Tutorials | 3 | 15-04-2024 02:24 |
| Portable Installer Inno Setup Script | y_thelastknight | Conversion Tutorials | 59 | 23-10-2020 00:02 |
| INDEX - Conversion Tutorial Index | Razor12911 | Conversion Tutorials | 5 | 11-06-2020 02:05 |
| Simple Arc Installer | 78372 | Conversion Tutorials | 1 | 15-06-2017 15:37 |
| MSC+Srep+lzma Simple Script Example | gozarck | Conversion Tutorials | 10 | 07-09-2015 16:31 |