mirror of https://github.com/ShareX/ShareX.git
Code refactoring
This commit is contained in:
parent
575973f8b0
commit
c97126a464
|
@ -102,21 +102,17 @@ Root: "HKCU"; Subkey: "Software\Classes\SystemFileAssociations\image\shell\Share
|
|||
#include "CodeDependencies.iss"
|
||||
|
||||
[Code]
|
||||
function IsAdmin(): Boolean;
|
||||
function IsAdmin: Boolean;
|
||||
begin
|
||||
Result := (IsAdminLoggedOn or IsPowerUserLoggedOn);
|
||||
end;
|
||||
|
||||
procedure InitializeWizard();
|
||||
var
|
||||
installDir: String;
|
||||
procedure InitializeWizard;
|
||||
begin
|
||||
if IsAdmin() then
|
||||
installDir := ExpandConstant('{pf}\{#MyAppName}')
|
||||
else
|
||||
installDir := ExpandConstant('{userpf}\{#MyAppName}');
|
||||
|
||||
WizardForm.DirEdit.Text := installDir;
|
||||
if not IsAdmin then
|
||||
begin
|
||||
WizardForm.DirEdit.Text := ExpandConstant('{userpf}\{#MyAppName}');
|
||||
end;
|
||||
|
||||
Dependency_InitializeWizard;
|
||||
end;
|
||||
|
|
Loading…
Reference in New Issue