Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Commit

Permalink
trying to make the program restart after silent install
Browse files Browse the repository at this point in the history
  • Loading branch information
celedev97 committed Nov 16, 2023
1 parent b95663b commit bff1eab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion innosetup/script.iss
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall

2 changes: 1 addition & 1 deletion src/main/java/dev/cele/asa_sm/services/UpdateService.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ private void downloadUpdate(Release latestRelease) {

// wait 4 seconds, and then run the installer, meanwhile close the current app to avoid file locking
new ProcessBuilder(
"cmd", "/c", "START", "/min", "cmd", "/c", "timeout", "/t", "4", "/nobreak", ">nul", "&&", tempFile.getAbsolutePath(), "/SILENT"
tempFile.getAbsolutePath(), "/SILENT", "/FORCECLOSEAPPLICATIONS", "/RESTARTAPPLICATIONS"
).start();
System.exit(0);
}else{
Expand Down

0 comments on commit bff1eab

Please sign in to comment.