mIRC Home    About    Download    Register    News    Help

Print Thread
#98527 24/09/04 10:45 AM
Joined: Sep 2004
Posts: 1
G
GLFox Offline OP
Mostly harmless
OP Offline
Mostly harmless
G
Joined: Sep 2004
Posts: 1
Anybody know? How can I get username for current user that logged on remote host?

#98528 07/10/04 02:55 AM
Joined: Oct 2003
Posts: 214
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 214
Code:
alias RegRead { if ($1) { var %a = regread | .comopen %a WScript.Shell | if !$comerr { var %b = $com(%a,RegRead,3,bstr,$1-),%c = $com(%a).result | .comclose %a | return %c } } }


then $regread(HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultUserName) would return the current username

this works unter win2k winxp win2k3 i think smile


one step closer to world domination

Link Copied to Clipboard