2.2.2 Scripts.ini Syntax

Scripts.ini is a text file encoded in UTF-16LE with Byte Order Mark (0xFFFE) that conforms to the following Augmented Backus-Naur Form (ABNF) [RFC4234].

  
 IniFile =         WhiteSpace Sections WhiteSpace
 Sections =        1*Section
 WhiteSpaceClass = CR / LF / WSP
 WhiteSpace =      *WhiteSpaceClass
 SpaceDelimiter =  1*WhiteSpaceClass
  
 Section =         SectionHeader Keys
  
 SectionHeader =   WhiteSpace "[" SectionName "]"   SpaceDelimiter
 SectionName =     TokLogon / TokLogoff / TokStartup / TokShutdown
  
 Keys =            1*Key
 Key =             TokKey TokIs TokValue
 TokKey =          WhiteSpace 1*(ALPHA / DIGIT)
 TokIs =           WhiteSpace "="
 TokValue =        WhiteSpace 1*(ALPHA / "_" / DIGIT )   SpaceDelimiter
  
 TokLogon =        WhiteSpace "Logon"                    WhiteSpace
 TokLogoff =       WhiteSpace "Logoff"                   WhiteSpace
 TokStartup =      WhiteSpace "Startup"                  WhiteSpace
 TokShutdown =     WhiteSpace "Shutdown"                 WhiteSpace
  

The specific format of scripts.ini MUST be as follows:

Sections: When used in computer policy mode (that is, with a computer-scoped GPO path), sections Startup and Shutdown are optional. The sections Logon and Logoff MUST NOT exist.

When used in user policy mode (that is, with a user-scoped GPO path), sections Logon and Logoff are optional. The sections Startup and Shutdown MUST NOT exist.

Any sections not valid for a particular mode MUST be ignored and do not invalidate the file.

Keys: Keys in the Startup, Shutdown, Logon, and Logoff sections MUST be named with the syntax "<integer>CmdLine" and "<integer>Parameters", where <integer> is the text representation of an integer value greater than or equal to zero and less than 2^31. If any key in the file begins with <integer>, both keys ("<integer>CmdLine" and "<integer>Parameters") MUST be present and come in pairs, though the order in which they appear can be interchanged. The <integer> value MUST start from 0 and MUST be in ascending order incremented by one.

TokValue: The values in the Startup, Shutdown, Logon, and Logoff sections are text strings. The text values of "<integer>CmdLine" keys MUST be file system paths that are specified by using any valid syntax for the client file systems that can reference files on the local computer or on a network location. The lengths of these paths MUST be fewer than 260 (Unicode) characters. Each path MUST be the path of an executable program that can be invoked by clients. The text values of "<integer>Parameters" keys can be any string (this is the string that is passed as command-line parameters to the executable program as part of its invocation by the client).<1>