mIRC Homepage
Posted By: Xanadu command similar to %systemroot% - 16/08/04 06:43 PM
Is there a mirc equivalent to getting the system root directory?


Thanks
Posted By: tidy_trax Re: command similar to %systemroot% - 16/08/04 06:47 PM
No, but you can get it using COM.

alias envar {
if ($com(a)) { .comclose a }
.comopen a WScript.Shell
if ($comerr) { return }
var %a = $com(a,ExpandEnvironmentStrings,3,bstr,$+(%,$1%))
%a = $com(a).result
.comclose a
return %a
}

//echo -a $envar(systemroot)
Posted By: ClickHeRe Re: command similar to %systemroot% - 16/08/04 06:55 PM
litlle type missing , =]

var %a = $com(a,ExpandEnvironmentStrings,3,bstr,$+(%,$1,%))
Posted By: starbucks_mafia Re: command similar to %systemroot% - 16/08/04 07:14 PM
It'll still work fine without it. You can place text directly after $n in the same way that you can with $*dir identifiers.
© mIRC Discussion Forums