The script file has sections, identified by brief text povided namein square brackets ([])
The first line in the script must contain the script's name as a section. The name provided must be identical to the name of the file, without the extension.
Example: If you have named your script (aka plugin) file as "ThatProgram.ini" you must head the script file with
[ThatProgram].
There are two other sections ([FILES] and [REGS]) described below. At least one of them may appear so the script specifies what to capture when NikSaver runs.
The following are entries under this first section of the script:
- [NAME]
Assigns a name to the script, as it will appear to the user in the list of programs for which scripts have been provided. If you are backing up a program or an application's settings, you should use the name of the program, for example: Winamp, WinZip etc... If the script is intended to backup a group of personal data items not related to an application, you can choose any name you like.
Required. - [DESCRIPTION]
This tag is used to write a small description for the benefit of the user of the plugin what the script does, what items it backs up, and any other relevant information.
Optional (when PATH is Registry Key). - [PATH]
This section will tell NikSaver where, in the registry, to find the path to the program's executable program. Most programs have this path to the program's installation folder stored in the registry, although some do not. If you cannot find the path to the program's installation folder in the registry, you will have to create one (usually in the same registry key that holds the configuration information; you can add a key called "InstallPath" as a string value, and provide the path to the program--do not include the program's name here, just the path).
Required.
Registry key example:
HKEY_CURRENT_USER\Software\Kurkov Software\NikSaver
File key example (NikSaver allows you to use batch-line references to environment variables by including them in percentage marks. In addition, NikSaver defines a number of other new names, about which, see further information below):
%Program_Files%\NetView\NetView.ini - [REG_KEY]
Selects the value under the key specified in the PATH tag where the path is stored.
Optional (when PATH is Registry Key), but Required if you include REG_KEY or ICON (below). - [ICON]
The name of the program's main executable (.exe or .ico) file, NikSaver will refer to this file to retrieve the version of the program installed on the machine during backup and restore. For instance NikSaver main executable file is named niksaver.exe.
Optional. - [VERSION]
A script written to backup an application or a programs' settings might not work for all the versions and builds of the program in question. It's vital when writing a script that backs up program-related data to specify which version(s) of the application the script will backup properly. In most cases, unless the leftmost number in the version number is different from the one you worked on, the script should work.
If the script is intended to backup non-program-related items, such as an MP3s folder, or if you know the plugin will work for all versions of an application, then use All as the value.
There can be any designation.
Optional. - [AUTHOR] and [E-MAIL]
Give credit where credit is due, if you're going to write the plugin script and you intend to share it so that other NikSaver users can benefit from it, you'll probably want to be able to leave your mark, the Author and E-mail tags, enables you to provide your personal information for users of the plugin to see.
It is filled with latin letters.
Optional. - [FILES]
If you have files to include (e.g., *.INI), you will require this script section head. Following the section head you must then provide one or more lines containing a path and file name (which may contain wild cards) to the file(s) to be saved. The path may be specified as %Prog%.
The entire line must end with an equal sign (=) this convention of the = and what it means should probably be explained here.
Example:
%Prog%\*.*= (Captures all files and folders in the path specified by %Prog%.) - [REGS]
If you have registry entries to include (e.g., HKEY_LOCAL_MACHINE\...), you will require this script section head. Following the section head you must then provide one or more lines containing a complete key name to be saved. You cannot specify specific value names to include or exclude within the key; it's "all or none."
The entire line must end with an equal sign (=) this convention of the = and what it means should probably be explained here.
Example:
HKEY_CURRENT_USER\Software\Kurkov Software\NikSaver= (Captures all registry entries within the key.)
Specific information that is included in the Windows environment may be included in scripts by using the same convention as used in batch files: For example, %windir% will be translated by NikSaver to mean the path to the Windows installation. These variables are identified by surrounding them with percent marks (%). To see the values available to you, open a command line window (Run...) and type "set" on the line. The environment variables available to you will be displayed.
Within NikSaver, (at least) one additional variable is defined:
%Prog% is the path name to the program's installation; it is the value you provided on the PATH statement in the first section of the script, and can be seen in the example provided in the descriptions of [FILES], above.
Thanks to Carol Ann for help!
