Install4j reboot

337 Views Asked by At

It is Possible with install4j to do an uninstall Force a Reboot And Continue with the Installation with Admin rights if they were granted with the Invocation for the uninstaller. Any hints are welcome. Thanks

1

There are 1 best solutions below

0
On

You can force a reboot by calling

context.triggerReboot(false);

in a "Run script" action. However, there is no feature that lets you call the installer again after the reboot and continue at the next screen.

What I would suggest in this case is to add a custom installer application for the post-processing on Installer->Screens & Actions and add a "Add a startup executable on Windows and OS X" action for this custom application to the installer.

After successful completion of the post-processing, you would have to delete the auto-start link. The link is in the directory

new File(FolderInfo.getSpecialFolder(FolderInfo.FOLDER_STARTUP, false)

has the name of the executable and a ".lnk" extension. If you use a "Delete files and directories" action, set its "Action elevation type" property to "Do not elevate".