Have you looked at Kix?
Heres a list of built in macros from kix:
Macros can be used anywhere an expression is expected. Supported macros are defined in the following table.
Bold items are new to this release
@Address Address of the network adapter
@Build Build number of the operating system
@Comment User comment (Description field in User Manager)
@CPU Name of the CPU (e.g.: "Intel Pentium III")
@CRLF Returns a carriage-return line-feed combination
@CSD CSD information (eg: "Service Pack 2")
@CurDir Current directory
@Date Date (in the format YYYY/MM/DD)
@Day Day of the week (Monday, Tuesday, etc.)
@Domain Domain or workgroup the computer belongs to
@DOS Version of Windows NT
@Error Return code of the most recent command or function. A return code of 0 means the command or function was successful. Any other value indicates an error.
@FullName Full name of current user
@HomeDir Short name of the directory part of home directory
@HomeDrive* Drive letter of drive containing home directory
@HomeShr Server and share name part of home directory
@HostName Fully qualified TCP/IP host name (including TCP/IP domain name)
@InWin Operating system: 1 = Windows NT; 2 = Windows 9x
@IPaddressX TCP/IP address (possible values for X are 0 - 3).
Note: Addresses are padded so that the resulting string always consists of four sets of three characters separated by periods. For example, if your IP address is 18.104.22.168, @IPADDRESS0 is "123. 45. 6. 7"
@KiX Version of KiXtart
@LanRoot Directory where network software resides (usually Systemroot\System32)
@LDomain* Logon domain
@LDrive Drive that is redirected to \\logonserver\NETLOGON
@LM Version of network software
@LogonMode If 1, indicates that KiXtart assumes to be running during the logon sequence
@LongHomeDir Long name of the directory part of home directory
@LServer Logon server
@MaxPWAge Maximum password age (Note: if passwords are set not to expire, this value is set to ((unsigned long)-1) (or 0xFFFFFFFF in hex). This evaluates to 4294967295 decimal).
@MDayNo Day of the month (1-31)
@MHz Approximation of the CPU speed (not available on Windows 9x)
@MonthNo Month number, beginning with January (1-12)
@Month Name of the month
@MSecs Milliseconds part of the current time
@PrimaryGroup* Current user's primary group
@Priv User's privilege level (GUEST, USER, ADMIN)
@ProductSuite OS Suite. Possible Values: 1 "Small Business"
16 "Terminal Server"
32 "Small Business (Restricted)"
64 "Embedded NT"
256 "Single User Terminal Server"
512 "Home Edition"
1024 "Blade Server"
@ProductType OS type. Possible values:
"Windows NT Workstation"
"Windows NT Server"
"Windows NT Domain Controller"
"Windows 2000 Professional"
"Windows 2000 Server"
"Windows 2000 Domain Controller"
"Windows XP Home Edition"
"Windows XP Professional"
"Windows .Net Server"
"Windows .Net Domain Controller"
@PWAge Password age
@RAS Number of active Remote Access Service (RAS) connections
@RServer* KXRPC server used for the current session
@ScriptDir Directory of current script
@ScriptName Name of the current script
@SError Error text corresponding with @ERROR
@SID* Current user's Windows NT Security Identifier (SID)
@Site** Name of the site in which the system resides
@StartDir Directory from which KiXtart was started
@SysLang Full English name of the language of the operating system specified in the format defined by ISO Standard 639. (example : “0413Dutch (Standard)”).
@Ticks Number of milliseconds elapsed since computer was last booted.
@Time Current time (in the format HH:MM:SS)
@UserID Current user's Windows NT user ID
@UserLang Full English name of the language selected by the current user specified in the format defined by ISO Standard 639. (example : “0413Dutch (Standard)”).
@WDayNo Days since Sunday (1 – 7)
@Wksta Computer name
@WUserID Current user's Windows user ID
@YDayNo Days since January 1 (1 – 365)
@Year Current year
*Available on computers running Windows 9x only if the KiXtart RPC service is running.
**Only available on clients with full Active Directory support.
Note: During the logon sequence, @WUserID is empty on computers running Windows 9x if Windows NT Networking has been configured as the system's primary network provider.
The following examples show the correct use of KiXtart macros:
DISPLAY @USERID + ".TXT"
displays the file "RUUDV.TXT"
CD "\DATA\" + @DOMAIN
changes the current directory to "\DATA\your-domain"