Login script error: This utility could not execute external program <name of program>

  • 7011492
  • 12-Dec-2012
  • 31-Jan-2013

Environment

Novell Client 4.91 SP5 for Windows XP
Novell Client 2 SP2 for Windows 7

Situation

In a login script, when including a variable to designate the relative path to an executable, the command fails. For example when the login script includes the line:

# %windir%\system32\calc.exe

the user sees the error:
 
This utility could not execute external program %windir%\system32\calc.exe

Executing the same application with the absolute path to the program, such as #c:\windows\system32\calc.exe, works fine.

Resolution

Correct the syntax of the variable.

See "Novell Login Scripts Guide" 3.2 Using Identifier Variables

The Novell Client login script syntax for referring to environment variables employs angle brackets: "To use environment variables as identifiers, enclose them in angle brackets (< >)."

The eDirectory login script and parsing is not a Windows batch file or command script, and the Windows batch file and command script method of using "%VariableName%" is not what's valid in an eDirectory login script.  (Nor is
Windows the only platform on which eDirectory login scripts execute.)

Note "environment variables" are different than "identifier variables".  Identifier variables are variables internal to the eDirectory login script processor itself, such as "OS", "SHELL_VERSION", etc.  WINDIR, because it's actually an environment variable, needs angle brackets.  OS, because it's an internal identifier variable, does not.

For a statement where the variable does not need to be in quotes, the variable itself can be used without any percent character:

> IF <WINDIR>=”C:\WINDOWS” THEN
> IF OS=”WINNT” THEN

If the variable is being referenced in a string that will otherwise be taken literally, such as within quotes, using the percent character is required to signal the parser that the text is not literal and needs to be processed as a variable:

> WRITE "WINDIR = %<WINDIR>"
> WRITE "OS = %OS"