Skip to content

Commit

Permalink
🐛 [Win] Fix the problem that win bootstrap script does not update the…
Browse files Browse the repository at this point in the history
… path (#1247)
  • Loading branch information
guiyanakuang authored Jun 13, 2024
1 parent 2d2ec6f commit ac71371
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,14 @@ class WindowsAppStartUpService(private val configManager: ConfigManager) : AppSt
var line: String?
while (reader.readLine().also { line = it } != null) {
if (line!!.contains("REG_SZ")) {
logger.info { "$AppName is set to start on boot." }
return true
val registryPath = line!!.substringAfter("REG_SZ").trim()
if (registryPath.equals(appExePath.absolutePathString(), ignoreCase = true)) {
logger.info { "$AppName is set to start on boot with the correct path." }
return true
} else {
logger.info { "$AppName is set to start on boot with the path is not current path." }
return false
}
}
}
} catch (e: Exception) {
Expand Down

0 comments on commit ac71371

Please sign in to comment.