I'm not commenting on your suggestion (people tend to be rather sensitive/argumentative about the whole thing lately :tongue:), but here's how it can be done with the current version of mirc: The WshShell object (part of the Windows Scripting Host) provides a method for expanding environment variables. One of those variables is %WINDIR%, which expands to the actual Windows dir. Here's the alias:
Code:
[color:green]; usage: $com(variable). The %'s around the name are NOT required.[/color]
alias env {
  if * !iswm $1 { return }
  var %a = env $+ $ticks
  .comopen %a Wscript.Shell
  if $comerr { return }
  if $com(%a,ExpandEnvironmentStrings,3,bstr,% $+ $1%) && $com(%a).result != % $+ $1% {
    .comclose %a
    return $ifmatch
  }
  .comclose %a
}
To get the Windows dir, use $env(windir)