优化开机自启逻辑
This commit is contained in:
parent
0ebf931235
commit
bd3dc18fce
Binary file not shown.
|
@ -35,9 +35,14 @@ public class AutoStartFile {
|
|||
StringJoiner fileContentJoiner = new StringJoiner("\n");
|
||||
String driveLetter = AUTO_START_EXEC_FILE_PATH.substring(0, 2);
|
||||
fileContentJoiner.add("@echo off");
|
||||
fileContentJoiner.add("if exist \"" + AUTO_START_EXEC_FILE_PATH + "RoomIt.exe\" (");
|
||||
fileContentJoiner.add(driveLetter);
|
||||
fileContentJoiner.add("cd " + ResourceUtils.getResourceByProject(""));
|
||||
fileContentJoiner.add("cd " + AUTO_START_EXEC_FILE_PATH);
|
||||
fileContentJoiner.add("start /b RoomIt");
|
||||
fileContentJoiner.add(") else (");
|
||||
fileContentJoiner.add("exit");
|
||||
fileContentJoiner.add(")");
|
||||
|
||||
String fileContent = fileContentJoiner.toString();
|
||||
|
||||
File startUpFile = new File(START_UP_FILE_PATH);
|
||||
|
|
Loading…
Reference in New Issue