Skip to content

Commit

Permalink
Better service cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tresf committed Sep 10, 2021
1 parent 44a8767 commit 107de5b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/qz/installer/WindowsInstaller.java
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,9 @@ public Installer removeServiceRegistration() {

WindowsUtilities.stopService(PROPS_FILE);
Path nssm = SystemUtilities.getJarParentPath().resolve("utils/nssm.exe");
if(ShellUtilities.execute(nssm.toString(), "remove", PROPS_FILE)) {
if(ShellUtilities.execute(nssm.toString(), "remove", PROPS_FILE, "confirm")) {
// Old tutorials used "QZ Tray" as the service name
ShellUtilities.execute(nssm.toString(), "remove", ABOUT_TITLE, "confirm");
// Restore default autostart settings by deleting the preference file
FileUtils.deleteQuietly(FileUtilities.SHARED_DIR.resolve(AUTOSTART_FILE).toFile());
log.info("System service successfully removed: {}", PROPS_FILE);
Expand Down

0 comments on commit 107de5b

Please sign in to comment.