waypoint100
waypoint100

Reputation: 201

Install4j - Is there a way to programmatically disable detection of previous installation?

"Detect previous installation directory" is on
"Alert for update installation" is on

Is there a way to disable those programmatically under certain circumstances? By default I still want to keep them enabled

Upvotes: 2

Views: 128

Answers (1)

waypoint100
waypoint100

Reputation: 201

after some trials and errors found this workaround:

context.setInstallationDirectory(new File("some directory different from existing installation"))

This will force installer not to trigger "update existing installation" sequence. Should be executed before welcome screen, e.g. in startup.

What didn't work:

  • Setting sys.confirmedUpdateInstallation=false, "Update alert" component will ignore it and override it to true
  • "Update alert" component cannot be disabled through its initialization or visibility scripts, it just completely ignores those. (a bug?)

Upvotes: 2

Related Questions