Nvn Installer provides two ways to use JScript to create custom actions, but any one of it can be used at a time.1.
Using a script fileFile Path
- shows complete path of the script file.
This depends on the value of "Is part of installation". Select appropriate value before you select file path. Nvn installer reads content from the script file and show in Script editor. Application prompts user before clearing editor content if some code already exists.2.
You can directly enter JScript code in the script editor.
NOTE: Currently Nvn Installer does not do any syntax checking, validation. It is just a basic editor with syntax highlighting.
Custom Action Name
- This can be any text description for your reference.
Is part of installation -
If value is true, then JScript file is considered as one of the file to be installed on target machine. When
you try to select file path i.e. when you click "...", pop up is shown with all files and folders. Select the JScript file which handles this custom
action. Nvn Installer does make any validation to check whether selected file can really handle the
respective custom action.
Following dialog shown with all components when “IS part of installation” is true.
[Image: with components form shown]
If value is false (default value) - It
is considered as binary file which is executed during installation and the file
is not stored anywhere on the target system. Microsoft installer cleans it after
completing the installation or rollback on installation failure.
Normal file select dialog is shown when “IS
part of installation” is false.
[Image: select file dialog]
JScript to call - As name says it can be any JScript function to be called.
when? – Following are the three
1. Installation - This custom action
is executed only during installation. For example a custom action creates a directory
in C: \<directory>. If option selected is installation, then directory is
created only during installation, but not during uninstallation or when
2. Uninstallation - This is executed
only during uninstallation.
3. Rollback - Windows installer will
clean up everything if installation fails, like all directories, registries etc.
But it cannot rollback anything done by the custom actions. So create rollback
custom action to restore target machine in case of any installation failure.
It is recommended to create uninstallation and rollback custom action for every
custom action that runs during installation.
It is also recommended to place uninstallation or rollback custom action next
to the corresponding installation custom action. But the order between
uninstallation and rollback custom actions does not really matter.
Download sample - Read Steps.txt in the sample
to know how to create a simplest JScript custom action and using the same with Nvn
For any questions, suggestions or bug reports, please drop a mail to firstname.lastname@example.org