Skip to content

Commit 3aa60e0

Browse files
committed
fix(*)
1 parent 5038b45 commit 3aa60e0

1 file changed

Lines changed: 3 additions & 28 deletions

File tree

windows/packaging/exe/inno_setup.iss

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ AppPublisher={{PUBLISHER_NAME}}
66
AppPublisherURL={{PUBLISHER_URL}}
77
AppSupportURL={{PUBLISHER_URL}}
88
AppUpdatesURL={{PUBLISHER_URL}}
9-
DefaultDirName={code:GetDefaultDir}
9+
DefaultDirName={{INSTALL_DIR_NAME}}
1010
DisableProgramGroupPage=yes
1111
OutputDir=.
1212
OutputBaseFilename={{OUTPUT_BASE_FILENAME}}
1313
Compression=lzma
1414
SolidCompression=yes
1515
SetupIconFile={{SETUP_ICON_FILE}}
1616
WizardStyle=modern
17-
PrivilegesRequired=lowest
17+
PrivilegesRequired={{PRIVILEGES_REQUIRED}}
1818
CloseApplications=yes
1919
CloseApplicationsFilter=*.exe
2020
[Languages]
@@ -58,29 +58,4 @@ Name: "{autoprograms}\\{{DISPLAY_NAME}}"; Filename: "{app}\\{{EXECUTABLE_NAME}}"
5858
Name: "{autodesktop}\\{{DISPLAY_NAME}}"; Filename: "{app}\\{{EXECUTABLE_NAME}}"; Tasks: desktopicon
5959
Name: "{userstartup}\\{{DISPLAY_NAME}}"; Filename: "{app}\\{{EXECUTABLE_NAME}}"; WorkingDir: "{app}"; Tasks: launchAtStartup
6060
[Run]
61-
Filename: "{app}\\{{EXECUTABLE_NAME}}"; Description: "{cm:LaunchProgram,{{DISPLAY_NAME}}}"; Flags: {% if PRIVILEGES_REQUIRED == 'admin' %}runascurrentuser{% endif %} nowait postinstall skipifsilent
62-
63-
[Code]
64-
function GetDefaultDir(Param: String): String;
65-
var
66-
DriveLetter: String; { Changed from Char to String }
67-
DrivePath: String;
68-
FoundDrive: Boolean;
69-
begin
70-
FoundDrive := False;
71-
Result := '';
72-
for DriveLetter := 'D' to 'Z' do
73-
begin
74-
DrivePath := DriveLetter + ':\'; { Both sides are now Strings }
75-
if DirExists(DrivePath) then
76-
begin
77-
Result := DrivePath + '{{INSTALL_DIR_NAME}}';
78-
FoundDrive := True;
79-
Break;
80-
end;
81-
end;
82-
if not FoundDrive then
83-
begin
84-
Result := ExpandConstant('{localappdata}\') + '{{INSTALL_DIR_NAME}}';
85-
end;
86-
end;
61+
Filename: "{app}\\{{EXECUTABLE_NAME}}"; Description: "{cm:LaunchProgram,{{DISPLAY_NAME}}}"; Flags: {% if PRIVILEGES_REQUIRED == 'admin' %}runascurrentuser{% endif %} nowait postinstall skipifsilent

0 commit comments

Comments
 (0)