Windows 2003: Logon script for user Administrator is not executed

In our Active Directory we’ve configured a logon script for the user Administrator but it wasn’t executed after logon. The script’s path was accessible via the network and could successfully be executed manually.

However, the problem was that somebody changed the script’s path in the Active Directory account from a simple logon.cmd to %LOGONSERVER%\netlogon\logon.cmd. Although the latter is the correct path for the script it wasn’t executed. After changing back the path to only the filename, it magically worked again 🙂

The problem with the absolute path above is, that the environment variable %LOGONSERVER% is not set until the logon script runs so the path could not be resolved beforehand to call the script.

Correct path to the logon script for user Administrator


Über Stefan

Polyglot Clean Code Developer

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    Markdown is turned off in code blocks:
     [This is not a link](

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see