mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2003
Posts: 39
X
Xanadu Offline OP
Ameglian cow
OP Offline
Ameglian cow
X
Joined: Jul 2003
Posts: 39
Is there a mirc equivalent to getting the system root directory?


Thanks

Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
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)


New username: hixxy
Joined: Jan 2003
Posts: 249
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Jan 2003
Posts: 249
litlle type missing , =]

var %a = $com(a,ExpandEnvironmentStrings,3,bstr,$+(%,$1,%))

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
It'll still work fine without it. You can place text directly after $n in the same way that you can with $*dir identifiers.


Spelling mistakes, grammatical errors, and stupid comments are intentional.

Link Copied to Clipboard