#97571 - 2003-01-08 07:20 PM
Re: is there a "RemoteComputerFromUser" UDF out there
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
To help the Helpdesk people we built a little app the sits on ALL clients called "PCname". When the Helpdesk gets a call they instruct the user to execute PCname and it displays all the info the HelpDesk needs.
http://mywebpages.comcast.net/habullock/PCname.jpg
This would be much more efficient and network friendly.
|
|
Top
|
|
|
|
#97574 - 2003-01-08 09:17 PM
Re: is there a "RemoteComputerFromUser" UDF out there
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
Inquisitor does good as a helpdesk app, but you need the PCName to be of much use...
|
|
Top
|
|
|
|
#97578 - 2003-01-11 07:52 AM
Re: is there a "RemoteComputerFromUser" UDF out there
|
JimRobinson
Fresh Scripter
Registered: 2003-01-10
Posts: 42
Loc: Tempe, AZ
|
I'm new here so if this violates the customs of this board, I'll not do it again.
I have been using the following batch based solution for a while now. I only post it because the batch is just a wrapper around the WINSCL Resource Kit (NT and 2k) utility, so could be easily modified to Kix, (which will be a nice first homework assignment for me). Also, it's the only way I have found to accomplish this.
Useage is 'locate username', where username is a valid NT username in your domain. Winscl.exe from the 2k Server Resource Kit and winsrpc.dll from a Windows 2000 Server are required in your path. And a functioning WINS environment, of course. code:
01. @echo off 02. if .%1.==.. GoTo :Useage 03. if not .%2.==.. GoTo :Useage 04. setlocal 05. set nameIP= 06. echo YOUR_IP_ADDRESS_HERE > winscl.txt 07. echo QN >> winscl.txt 08. echo %1 >> winscl.txt 09. echo 1 >> winscl.txt 10. echo 03 >> winscl.txt 11. echo 0 >> winscl.txt 12. echo EX >> winscl.txt 13. 14. for /f "tokens=3 delims=)( " %%i in ('winscl.exe T ^< winscl.txt ^| Find "Address is"') do set nameIP=%%i 15. if not defined nameIP (for /f "tokens=7 delims=)( " %%j in ('winscl.exe T ^< winscl.txt ^| Find "Member is"') do set nameIP=%%j) 16. for /f "tokens=2" %%k in ('ping -a -n 1 %nameIP% ^| Find "Pinging"') do set host=%%k 17. echo For username: %1 18. echo At IP Address: %nameIP% 19. echo Hostname is: %host% 20. endlocal 21. GoTo :eof 22. 23. :Useage 24. echo. 25. echo Locate.bat, Written 2002 by Jim Robinson 26. echo. 27. echo Requirements: 28. echo ============= 29. echo WINS 30. echo Windows 2000, 31. echo locate.bat, 32. echo winscl.exe (from the Windows 2000 Server Resource Kit), 33. echo winsrpc.dll (from a Windows 2000 Server). 34. echo All located in the current directory or a directory in your path. 35. echo. 36. echo Useage: 37. echo ======= 38. echo locate username 39. echo Where username is an NT username on your network. 40. echo. 41. echo Modifications: 42. echo ============== 43. echo Change the IP address in the script to the IP address of your 44. echo local WINS server.
_________________________
Jim --------------------
|
|
Top
|
|
|
|
#97580 - 2003-01-12 12:33 AM
Re: is there a "RemoteComputerFromUser" UDF out there
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
From MS: Winscl.exe: WINS Administration Tool Manages Windows Internet Name Service activities and databases. http://www.microsoft.com/windows2000/techinfo/reskit/rktour/server/S_tools.asp#W
Now I'll have to go find my reskit and look into this. My ofice is almost 100% win2k and AD, but we will probably still run WINS for the next 100 years
|
|
Top
|
|
|
|
#97581 - 2003-01-11 03:38 PM
Re: is there a "RemoteComputerFromUser" UDF out there
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
The downside of relying on Winscl is that the user needs Administrator rights to access the WINS database. Not something you want the HelpDesk to have, but it's use could be accomplished by a server based process and web page.
|
|
Top
|
|
|
|
#97583 - 2003-01-11 05:07 PM
Re: is there a "RemoteComputerFromUser" UDF out there
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
Rocco... See EnumDHCP() - uses DHCPCMD.exe to return assigned addresses
This will tell you the name of whoever is logged onto that PC: $remoteuser=wmiquery("UserName","Win32_ComputerSystem",$computer)
look into Inquisitor on my Kix page for code that pings and checks names...
|
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 657 anonymous users online.
|
|
|