Novell Home

My Favorites

Close

Please to see your favorites.

What variables can be used with NAL?

(Last modified: 07Jan2003)

This document (10025619) is provided subject to the disclaimer at the end of this document.

goal

What variables can be used with NAL?

fact

Novell Application Launcher (NAL) 3.0

This information was exported from the Novell LogicSource for ZENworks

fix

Macros can be used within Application objects. They are not global macros and do not modify the system or user environment. The macros can either be imported from an .AOT or .AXT file or created manually. The macros can be used in every setting or parameter of this Application object. To use a macro, place the variable name between percent signs: %macroname%.

Use the Macros page to manage the Application object macros that you create for this Application object and that are used on other property pages of the Application object. You can use all types of macros (including Application object macros) in the following Application object locations:

Path to Executable (Identification property page)
Command Line (Environment property page)
Working Directory (Environment property page)
Mapping Path (Drives/Ports property page)
Capture Port Path (Drives/Ports property page)
Registry Settings Property Page: Key, Name, Value (String only)
.INI Settings Property Page: Group, Name, Value
Application Files Property Page: Source/Target, Directory
Text Files Property Page: Find and Add String
Icons/Shortcuts Property Page: All locations

Interface Description

Import
You can import macros from an .AOT or .AXT file. While running snAppShot, you are prompted for the SOURCE_PATH and TARGET_PATH macros. These are the minimum macros when importing an .AOT or .AXT file. When you export an Application object, it saves the macros that you have added.

Modify
Use this option when you want to modify an existing macro.

Add
String value
You can add a fixed string value that will be replaced and is specific to this Application object.

Prompted -> Drive
Use this option if you want the user to be prompted for a drive letter.

The following options are available:

Prompt text
Macro name
Default value
Minimum disk space /MB
Minimum string length characters

Prompted -> string
Use this option if you want the user to enter text that will be used during the application installation (prompted macro).

The following options are available:

Prompted text
Macro name
Default value
Minimum disk space /MB
Maximum string length /characters

Types of Macros and Precedence
A macro is simply a variable name. The value of a variable is substituted for the variable name. If the variable is not found, it is not replaced with a value. A macro value is generally a string value.

Following is a list and description of the five different types of macros or variables that you can use with Application Launcher. The order in which the macros appear is also their order of precedence (for example, Application Object Macros take precedence over Login Script Macros):

Application Object Macros
Special Windows Macros
Login Script Macros (Variables)
NDS Attribute Macros
Environment Macros (Variables)

Application Object Macros
An Application object macro variable is one that is defined only for the Macros property page of a particular Application object. The % characters are required to enclose the macro name. For example:

%SOURCE_PATH% Location of source files
%TARGET_PATH% Location to copy files

NOTE: For best results, Novell recommends using a UNC pathname for the source path rather than a mapped drive. If you use a drive mapping as the source drive, some files might not copy correctly.

Example
Suppose that you have a complex Application object that uses the %SOURCE_PATH% macro throughout numerous property pages. What if the path that %SOURCE_PATH% points to changes? Rather than change each case, you can change the value of %SOURCE_PATH% one time on the Macros property page; the change is reflected on all other property pages where the macro is used.

Nested Macros
Application objects support the use of nested macros. This means macros can be used within macros. For example:

%TARGET_PATH%=%*WINDISK%\Program Files
EMAIL_ADDRESS=%CN%@Novell.com

This capability provides greater flexibility for using macros within Application objects.

For best results use a UNC pathname for the source path rather than a mapped drive. If a drive mapping is used as the source drive, some files might not copy correctly.

Prompted Macros
ZENworks 2 introduces a new type of Application object macro called the prompted macro.

When an Application Launcher-delivered application is launched, the user can be prompted for information. For example, you may want to allow the user to install the application to any local drive, such as C, D, or E. With prompted macros, the user can be prompted with a list of drive letters from which to choose. After a drive letter is selected, the application files are installed on the selected drive.

To configure the Application object to prompt the user for a drive letter, use the following steps:

Create a new Application object or go to the Details of an existing Application object.

On the Macros page, select Add > Prompted > Drive.

Give the macro a name such as DriveLetter.

Type the appropriate Prompt text, such as "Select the local drive where you want the application installed."

Set the Default Value to the appropriate drive letter.

Set the Minimum disk space if you want only the drives that meet the minimum to be listed.

Create a nested macro. Modify any appropriate existing macros, such as TARGET_PATH, that contain a hard-coded drive letter and replace the drive letter and colon (:) with the macro created above. For example, if TARGET_PATH contains C:\Program Files\, replace C: with %DriveLetter% so that the TARGET_PATH becomes %DriveLetter%\Program Files\

NOTE: If the application is configured for multiple prompted macros, you cannot specify the order of the prompts.

Special Windows Macros
A special Windows macro is one that defines Windows 3.x, Windows 95/98, and Windows NT directories. The typical paths listed below are based on default installations and may or may not match your specific setup. On Windows 95/98 workstations, macros behave differently if User Profiles are enabled.

For example, suppose that you have installed Windows to drive D (for example, D:\WINDOWS). However, an application installation expects Windows to be on drive C (C:\WINDOWS). Using the %*WinDisk% special macro, you can substitute drive C with the macro for the files that require it. See Application Files.

The macros shown in Table 10-2 are very helpful for redirecting application files that expect Windows directories to be in a particular location.

IMPORTANT: The asterisk character (*) is a required syntax for these macros. Don't confuse these asterisk characters with the third-party trademark asterisk you see elsewhere in this chapter.

Table 10-2. Special Windows Macros (For All Versions of Windows)
Macro
 Description
 
%*WinDir%
 Windows directory, typically C:\WINDOWS or C:\WINNT
 
%*WinSysDir%
 Windows system directory, typically C:\WINDOWS\SYSTEM or C:\WINNT\SYSTEM32
 
%*WinDisk%
 Drive letter (plus colon) for Windows directory, typically C:
 
%*WinSysDisk%
 Drive letter (plus colon) for Windows system directory C:
 
%*WinSys16Dir%
 Windows NT** 16-bit system directory (C:\WINNT\SYSTEM)
 
%*TempDir%
 Windows temporary directory (C:\WINDOWS\TEMP)
 

The following variables are available on Windows 95/98 and NT only. These macros originate from the HKEY_CURRENT_USER\SOFTWARE\ MICROSOFT\WINDOWS\ CURRENTVERSION\EXPLORER\SHELL FOLDERS Registry key.

Table 10-3. Special Windows 95/98 and NT Macros
Macro
 Description
 
%*AppData%
 File system directory that serves as a common repository for application-specific data, typically C:\WINNT\PROFILES\ADMINISTRATOR\APPLICATION DATA. Used only by Windows NT version 4.
 
%*WinDesktop%
 Windows desktop directory (C:\WINDOWS\DESKTOP or C:\WINNT\PROFILES\<USERNAME>\DESKTOP FOR WINDOWS NT). Note: This is an Application Launcher 2.0 macro that is allowed for backward compatibility.
 
%*Desktop%
 File system directory used to physically store file objects on the desktop (not to be confused with the desktop folder itself). Typically this directory is C:\WINDOWS\DESKTOP or C:\WINNT\PROFILES\ADMINISTRATOR\DESKTOP.
 
%*CommonWinDesktop%
 Windows NT common desktop directory (C:\WINNT\PROFILES\ALL USERS\DESKTOP). Note: This is an Application Launcher 2.0 macro that is allowed for backward compatibility.
 
%*CommonDesktop%
 File system directory that contains files and folders that appear on the desktop for all users, typically C:\WINNT\PROFILES\ALL USERS\DESKTOP. If not available, the *DESKTOP value will be used.
 
%*Favorites%
 File system directory that serves as a common repository for the user's favorite items. Typically this directory is C:\WINDOWS\FAVORITES or C:\WINNT\PROFILES\ADMINISTRATORFAVORITES.
 
%*Fonts%
 Virtual folder containing fonts, typically, C:\WINDOWS\FONTS or C:\WINNT\FONTS.
 
%*NetHood%
 File system directory containing objects that appear in the network neighborhood, typically C:\WINDOWS\NETHOOD or C:\WINNT\PROFILES\ADMINISTRATOR\NETHOOD.
 
%*PrintHood%
 File system directory that serves as a common repository for printer links, typically C:\WINNT\PROFILES\ADMINISTRATOR\PRINTHOOD. Only used by Windows NT 4.
 
%*Personal%
 File system directory that serves as a common repository for documents, typically C:\MYFILES or C:\WINNT\PROFILES\ADMINISTRATOR\PERSONAL.
 
%*Programs%
 File system directory that contains the user's program groups (which are also file system directories), typically C:\WINDOWS\START MENU\PROGRAMS or C:\WINNT\PROFILES\ADMINISTRATOR\START MENU\PROGRAMS.
 
%*CommonPrograms%
 File system directory that contains the directories for the common program groups that appear on the Start menu for all users, typically C:\WINNT\PROFILES\ALL USERS\START MENU\PROGRAMS. If not available, the *PROGRAMS value will be used.
 
%*Recent%
 File system directory that contains the user's most recently used documents, typically C:\WINDOWS\RECENT or C:\WINNT\PROFILES\ADMINISTRATOR\RECENT.
 
%*SendTo%
 File system directory that contains Send To menu items, typically C:\WINDOWS\SENDTO or C:\WINNT\PROFILES\ADMINISTRATOR\SENDTO.
 
%*StartMenu%
 File system directory containing Start menu items, typically C:\WINDOWS\START MENU or C:\WINNT\PROFILES\ADMINISTRATOR\START MENU.
 
%*CommonStartMenu%
 File system directory that contains the programs and folders that appear on the Start menu for all users, typically C:\WINNT\PROFILES\ALL USERS\START MENU. If not available, the *STARTMENU value will be used.
 
%*Startup%
 File system directory that corresponds to the user's Startup program group, typically C:\WINDOWS\START MENU\PROGRAMS\STARTUP or C:\WINNT\PROFILES\ADMINISTRATOR\START MENU\PROGRAMS\ STARTUP.
 
%*CommonStartup%
 File system directory that contains the programs that appear in the Startup folder for all users. The system starts these programs whenever any user logs in to Windows NT or starts Windows 95/98. Typically this directory is C:\WINNT\PROFILES\ALL USERS\START MENU\PROGRAMS\STARTUP. If not available, the *STARTUP value will be used.
 
%*Templates%
 File system directory that serves as a common repository for document templates, typically C:\WINDOWS\SHELLNEW or C:\WINNT\SHELLNEW.
 
%*TempDir%
 Windows temporary directory (C:\WINDOWS\TEMP).
 

Login Script Macros (Variables)
Application Launcher supports many of the familiar login script variables. For a list of login script variables that are not supported, see "Unsupported Login Script Macros" later in this chapter.

Supported Login Script Macros
The following is a list of supported login script macros and what they mean. Alternate macro names are shown in parentheses.

Table 10-4. Supported Login Script Macros
Macro
 Description
 
DAY
 Numeric day of the month. For example: 01, 10, 15.
 
FILESERVER (FILE_SERVER)
 Name of the NetWare file server or NDS-monitored connection. For example: APPS_PROD.
 
FULL_NAME
 Full name attribute of the User object. This is supported by virtue of Application Launcher's support for NDS attributes from the User object.
 
HOUR24 (24HOUR)
 Time of the day according to a 24-hour clock. For example: 02, 05, 14, 22.
 
HOUR (HOURS)
 Hour of the day. For example: 0 = 12, 13 = 1.
 
LAST_NAME
 Last name of the current user (also known as the user's NDS Surname attribute). For example: Jones.
 
LOGIN_NAME
 First eight bytes of the user's NDS object name. For example: jsmith.
 
MINUTE (MINUTES)
 Current minute. For example: 02, 59.
 
MONTH
 Current month number. For example: 01 for January.
 
NDAY_OF_WEEK
 Numeric day of the week. For example: 1 for Sunday.
 
NETWORK (NETWORK_ADDRESS)
 Workstation network address. For example: 01010120.
 
OS_VERSION
 Version of the OS. For example: v5.00. (Win3 shows the DOS version, Win 95/98 and NT shows the Windows version.)
 
OS
 OS type. For example: MSDOS, WIN95/98, WINNT. (Win3x shows MSDOS.)
 
PLATFORM
 Platform running. For example: WIN, W95, W98, WNT.
 
PHYSICAL_STATION (P_STATION)
 MAC address. For example: 0000C04FD92ECA.
 
REQUESTER_CONTEXT
 Context of the requester for the selected tree.
 
SECOND (SECONDS)
 Number of seconds. For example: 03, 54.
 
SHORT_YEAR
 Short year number. For example: 98, 00.
 
WINVER
 Windows version. For example: v3.11, v4.00.
 
YEAR
 Full year number. For example: 1998.
 

Unsupported Login Script Macros
The following is a list of login script macros that Application Launcher does not support:

ACCESS_SERVER
AM_PM
DAY_OF_WEEK
DIALUP
ERROR_LEVEL
GREETING_TIME
LOCATION
LOGIN_ALIAS_CONTEXT
LOGIN_CONTEXT
MACHINE
MONTH_NAME
NEW_MAIL
OFFLINE
PASSWORD_EXPIRES
REQUESTER_VERSION
SHELL_VERSION
SMACHINE
STATION
USERID

NDS Attribute Macros
Application Launcher supports macros that pull information from the attributes of the currently logged-in user, the current Application object, or from the attributes of other NDS objects.

Example:

A GroupWise* Application object runs OFWIN.EXE with a command line parameter:

/U-@USERNAME@

USERNAME can be replaced with a macro that uses a user's NDS common name (CN):

/U-@%CN%@

If the NDS object name is the same as the e-mail login for GroupWise, every user that runs the application has the correct username passed into GroupWise.

NDS Attribute Variables for Current User
You can add variables that are defined by an attribute in an NDS User object. The following is a sample list:

Table 10-5. User Object Macros
Macro
 Description
 
%CN%
 Common Name (user's object name or login name)
 
%DN%
 User's Full Distinguished Name (used with Application Launcher only)
 
%Given Name%
 Given Name
 
%Surname%
 Last Name
 
%Full Name%
 Full Name
 
%Telephone Number%
 Telephone
 
%Home Directory%
 Home Directory
 
%Email Address%
 E-Mail Address
 
%Mailbox ID%
 Mailbox ID
 

By default, the currently logged-in user is the source NDS object for these attributes.

NDS Attributes from the Current Application Object
Any attribute defined in the Application object can be used as variables. The following table shows some examples using %*;NDSATTRIB%.

Table 10-6. Application Object Macros
Macro Name
 Description
 
%*;DN%
 Application object's Distinguished Name (used with Application Launcher only)
 
%*;App:Caption%
 Application Icon Title
 
%*;App:Path%
 Path to Executable
 
%*;App:GUID%
 GUID
 
%*;App:Version String%
 Version Stamp
 

NDS Attributes from Other Objects
Any attributes of other NDS objects can be used with the following syntax:

%.OBJNAME.CONTAINER;NDSATTRIB%

For example:

%.UserName.Novell;Description%

where the description attribute of the username.novell object is pulled.

Environment Macros (Variables)
Application Launcher supports all environment variables as macros. Here are a few examples:

%NWLANGUAGE%
%TEMP%
%PATH%

WARNING: The number of characters replacing the macro string cannot exceed the total allowable size of the string where the macro is used. Most often that limit is approximately 260 characters. If the limit will be exceeded by the macro replacement, the macro will not be replaced..

disclaimer

The Origin of this information may be internal or external to Novell. Novell makes all reasonable efforts to verify this information. However, the information provided in this document is for your information only. Novell makes no explicit or implied claims to the validity of this information.
Any trademarks referenced in this document are the property of their respective owners. Consult your product manuals for complete trademark information.

  • Document ID:
  • 10025619
  • Solution ID: 1.0.51690920.2512275
  • Creation Date: 26Jan2000
  • Modified Date: 07Jan2003
    • NovellManagement Products

      NetWare

Did this document solve your problem? Provide Feedback