Announcement

Collapse
No announcement yet.

Find PC where a user is logged on

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Find PC where a user is logged on

    Run this script giving it the Username as an argument

    @echo off
    net send %1 "Test - Click me away"
    nbtstat -c | find /i "%1" >usr.txt
    for /f "tokens=4 delims= " %%i in (usr.txt) do set machineip=%%i
    ping -a -n 1 %machineip% > ip.txt
    sort /r <ip.txt >ip1.txt
    for /f "skip=1 tokens=2 delims= " %%i in (ip1.txt) do set machinename=%%i
    net send %COMPUTERNAME% IP=%machineip% Computer-Name=%machinename%

    regards

    Osama

  • #2
    Re: Find PC where a user is logged on

    <div class="ubbcode-block"><div class="ubbcode-header">Quote:</div><div class="ubbcode-body">Originally posted by O. Salah:
    <span style="font-weight: bold">Run this script giving it the Username as an argument

    @echo off
    net send %1 "Test - Click me away"
    nbtstat -c | find /i "%1" >usr.txt
    for /f "tokens=4 delims= " %%i in (usr.txt) do set machineip=%%i
    ping -a -n 1 %machineip% > ip.txt
    sort /r <ip.txt >ip1.txt
    for /f "skip=1 tokens=2 delims= " %%i in (ip1.txt) do set machinename=%%i
    net send %COMPUTERNAME% IP=%machineip% Computer-Name=%machinename%

    regards

    Osama</span></div></div>

    or go on http://www.securewave.com/products/f...utilities.html to download a small GUI for this.

    regards

    Rolf

    Comment

    Working...
    X