While, for the most part, you can run existing PC-Admin SNC scripts unchanged, there are some differences that you should be aware of.
Some commands that were run on PC-Admin clients are ignored by the script interpreter (see "Ignored Script Directives").
New directives read and write to the system Registry (see "New Script Directives for Windows 95 and Windows NT Clients").
Environment variables are handled differently (see "Environment Variables Local to SNC Scripts").
With the addition of NIS+ support, the NIS and NIS+ values are handled differently (see "NIS and NIS+ Changes").
The following directives are ignored by the script interpreter.
Command |
Function in PC-Admin |
---|---|
LOGIN |
Starts the Microsoft Windows Login dialog box |
LOGOUT |
Logs out current user and set current user ID to nobody |
RESERVE |
Prevents users from mounting drives |
EXPORT |
Copies local to global variables |
STOP |
Shuts down client's connection to network |
MOUNT -o preserve |
Prevents user from unmounting a drive or printer |
MOUNT -o type |
Media type (cdrom or std) |
New commands are available that enable you to read and write to the system Registry.
The SET REG command enables you to read values from the system Registry into a variable. This is analogous to the SET NIS command. The keys HKEY_LOCAL_MACHINE may be abbreviated to HKLM and HKEY_CURENT_USER may be abbreviated to HKCU.
The REG directive command enables you to write to the system Registry. This command should be used with great caution.
For example, the command REG NEWKEY keypath creates a new key, and the command REG DELKEY keypath deletes the named key.
Solstice Network Client supports both NIS and NIS+ on Windows 95 and Windows NT clients. The SET NIS directive looks up values in either or both NIS and NIS+, depending on the configuration of the local machine.
To facilitate backward compatibility, you should use NIS table names, unless you KNOW that you are using NIS+ in native (non-yp) mode. If you are using NIS+, do NOT add the trailing org_dir to the table name.
If NIS+ is enabled, table names are converted according to these rules:
The first period in a name is converted to an underscore.
The string org_dir is appended to the name.
For example,
auto.home becomes auto_home.org_dir
passwd becomes passwd.org_dir
If you are adapting PC-Admin scripts, note that the return value from NIS+ can be different from NIS, so you may need to use the SET STR command to alter the result.
The SET STR VAR=# %OTHERVAR and SET STR VAR=* %VAR% directives are useful for this purpose. See the description of SNC directives in "SNC Script Directives".