The samples directory in your install4j installation contains sample code for all types of custom extensions in install4j.
The sub-directories have the following contents:
| File | Description |
|---|---|
| AssociateFileTypeAction.java | Shows how to create a file association on Windows in a a custom install action. Note that standard file associations can be configured in the install4j GUI. |
| CreateDesktopLinkAction.java | Shows how to create an additional desktop icon in a custom install action. |
| CreateProgramGroupEntriesAction.java | Shows how to create additional program group entries a custom install action. |
| DeleteFromProgramGroupAction.java | Shows how to delete certain program group entries in a custom install action. |
| DeleteFromRegistryAction.java | Shows how to delete a registry value in a custom uninstallation action. |
| ExecuteAction.java | Shows how to execute an external installer and wait for its completion. |
| InstallToSystem32Action.java | Shows how to install some files to the system32 directory in Windows. |
| ProgressInterfaceExampleAction.java | Shows how to use the ProgressInterface that is passed to a custom action. |
| SetEnvironmentVariableAction.java | Shows how to set an environment variable on Windows. |
| UnassociateFileTypeAction.java | Shows how to remove a file association in an uninstall action. Note that file associations that are configured in the GUI are removed automatically. |
| WriteToRegistryAction.java | Shows how to write a value to the Windows registry. |
| File | Description |
|---|---|
| LicenseKeyScreen.java | A sample custom screen that allows the user to enter license information. |
| SelectJdkScreen.java | Custom screen that requires the user to select one of the installed JDKs and configures the installed application to use the selected JDK. |
| File | Description |
|---|---|
| InstallToSystem32InstallationHandler.java | Sample code for the InstallationHandler custom extension. Shows how to install files to the Windows directory depending on their location in the distribution tree. |
| NoSpacesDirectoryValidator.java | Sample code for the DirectoryValidator custom extension. Shows how to prevent the user from selecting an installation directory with spaces in the path name. |
| NoWin9XStartupHandler.java | Sample code for the StartupHandler custom extension. Shows how to prevent the installer from running on a Win9x system. |