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

Commit

Permalink
Fix updated notification
Browse files Browse the repository at this point in the history
  • Loading branch information
micrusa committed Jun 24, 2020
1 parent e829c1f commit 090c5ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/main/java/me/micrusa/autoscreensettings/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ public class Constants {
public static final String SETTINGS_PATH = APPDATA_PATH + "settings.properties";
public static final String APP_PATH = APPDATA_PATH + "app.jar";
public static final String START_SCRIPT = "java -jar " + APP_PATH + " autorun";
public static final String UPDATE_SCRIPT = "java -jar " + APP_PATH + " update";

public static final String PROPS_CURRENT_VER = "2";
public static final String PROP_VER = "ver";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ public static void openDialog(){
Files.copy(appFile, new File(Constants.APP_PATH));
Advapi32Util.registrySetStringValue(WinReg.HKEY_LOCAL_MACHINE,
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", "AutoScreenSettings", Constants.START_SCRIPT);
System.out.println(Constants.START_SCRIPT);
Runtime.getRuntime().exec(Constants.START_SCRIPT);
Runtime.getRuntime().exec(Constants.UPDATE_SCRIPT);
System.exit(1);
} catch (URISyntaxException | IOException e) {
utils.showException("Error in installation", e);
Expand Down

0 comments on commit 090c5ab

Please sign in to comment.