Installer skips the installation type stage on 9x/ME and defaults to

installing the app in 'C:\Program Files\TuxPaint\', but installs the menu
items and the desktop short-cut for the current user only. Rubbish, but
I can't find a way of automatically regenerating the menus, which seems to
be required to support shared menu/desktop short-cuts.
This commit is contained in:
John Popplewell 2005-11-08 03:25:58 +00:00
parent bbe6ddf81f
commit 29088b347b

View file

@ -118,14 +118,12 @@ const
CSIDL_COMMON_PROGRAMS = $0017;
CSIDL_COMMON_DESKTOPDIRECTORY = $0019;
var
InstallTypePageID: Integer;
CheckListBox2: TNewCheckListBox;
function Restricted(): Boolean;
begin
if IsAdminLoggedOn() or IsPowerUserLoggedOn() then
Result := false
else
Result := true
Result := not (IsAdminLoggedOn() or IsPowerUserLoggedOn())
end;
function NotRestricted(): Boolean;
@ -145,7 +143,7 @@ end;
function ThisUserOnly(): Boolean;
begin
Result := Restricted() or CurrentUserOnly()
Result := (Restricted() or CurrentUserOnly()) and UsingWinNT()
end;
function AllUsers(): Boolean;
@ -200,6 +198,7 @@ var
Enabled, InstallAllUsers: Boolean;
begin
Page := CreateCustomPage(wpLicense, 'Choose Installation Type', 'Who do you want to be able to use this program?');
InstallTypePageID := Page.ID;
Enabled := NotRestricted();
InstallAllUsers := NotRestricted();
CheckListBox2 := TNewCheckListBox.Create(Page);
@ -224,6 +223,11 @@ begin
end
end;
function ShouldSkipPage(PageID: Integer): Boolean;
begin
Result := (PageID = InstallTypePageID) and Is9xME();
end;
procedure InitializeWizard();
begin
CreateTheWizardPages;