Page 2 of 4 <1234>
Topic Options
#97564 - 2003-01-08 04:53 PM Re: is there a "RemoteComputerFromUser" UDF out there
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
One more Question though :

How would you like the UI Color ? [Wink]
_________________________



Top
#97565 - 2003-01-08 05:09 PM Re: is there a "RemoteComputerFromUser" UDF out there
Rocco Capra Offline
Hey THIS is FUN
*****

Registered: 2002-04-01
Posts: 380
Loc: Mansfield Ohio
#3E4E5E
_________________________
I Love this board!! -------------------- My DEV PC is running KIX 4.22 WINXP Pro

Top
#97566 - 2003-01-08 05:13 PM Re: is there a "RemoteComputerFromUser" UDF out there
Rocco Capra Offline
Hey THIS is FUN
*****

Registered: 2002-04-01
Posts: 380
Loc: Mansfield Ohio
Rad,

How to scan Event log with kix?

I can do a backup to a csv or txt and then 'readline' till I find the user I need. Or is there an easier way.

Rocco
_________________________
I Love this board!! -------------------- My DEV PC is running KIX 4.22 WINXP Pro

Top
#97567 - 2003-01-08 06:19 PM Re: is there a "RemoteComputerFromUser" UDF out there
Rocco Capra Offline
Hey THIS is FUN
*****

Registered: 2002-04-01
Posts: 380
Loc: Mansfield Ohio
Rad,

You said eairlier...
quote:
I have made routines that parse a specific subnet, ping the computers with active leases, connect to each on-line PC and retreieve the loggedon user name.
Is that a UDF? Can I see the code?

Rocco
_________________________
I Love this board!! -------------------- My DEV PC is running KIX 4.22 WINXP Pro

Top
#97568 - 2003-01-08 06:22 PM Re: is there a "RemoteComputerFromUser" UDF out there
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Use the ReadEventlog() UDF to filter all domain controller eventlogs for login entries for that specific user. This will retieve a list of computers a user logged in to. You could also use the optional date field to limit your search.
_________________________
There are two types of vessels, submarines and targets.

Top
#97569 - 2003-01-08 07:05 PM Re: is there a "RemoteComputerFromUser" UDF out there
Rocco Capra Offline
Hey THIS is FUN
*****

Registered: 2002-04-01
Posts: 380
Loc: Mansfield Ohio
Here's a start...
code:
BREAK ON CLS
;------------------------------------------------------------------------------
?'[ Enter the UserName -> '
GETS $USERNAME
;------------------------------------------------------------------------------
FOR EACH $COMPUTER IN NetView2(@LDOMAIN)
$PC='\\'+$COMPUTER
?'$PC'
$REMUSER=ReadValue($PC+"\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","DefaultUserName")
IF $REMUSER=''
$REMUSER='no one'
ENDIF
?'$REMUSER'
IF $REMUSER='$USERNAME'
MessageBox('$USERNAME is logged on $PC','$PC',0,30)
SendMessage (@WKSTA,'$USERNAME is logged on $PC')
GOTO VNC
; EXIT 0
ENDIF
NEXT
;------------------------------------------------------------------------------
:VNC
?'[ This is the VNC Part ]'
;------------------------------------------------------------------------------
:END
?'[ Press a Key to Exit ]'
GET $_
;------------------------------------------------------------------------------

What do ya'll think?

Rocco
_________________________
I Love this board!! -------------------- My DEV PC is running KIX 4.22 WINXP Pro

Top
#97570 - 2003-01-08 07:11 PM Re: is there a "RemoteComputerFromUser" UDF out there
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Won't really help you as this registry will contain the name of the last logged-in user. It will not get removed if the user logs off. Therefore, you will also have to check whether HKEY_USERS contains the user's SID as an indicator that the user is actually logged in. Or you use the LoggedinUsers() UDF to cross-check the computers identified by your code.
_________________________
There are two types of vessels, submarines and targets.

Top
#97571 - 2003-01-08 07:20 PM Re: is there a "RemoteComputerFromUser" UDF out there
Howard Bullock Offline
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.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#97572 - 2003-01-08 07:24 PM Re: is there a "RemoteComputerFromUser" UDF out there
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I think NTDOC wrote something like that too. In his case I think a report is emailed to the helpdesk.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#97573 - 2003-01-08 07:51 PM Re: is there a "RemoteComputerFromUser" UDF out there
Rocco Capra Offline
Hey THIS is FUN
*****

Registered: 2002-04-01
Posts: 380
Loc: Mansfield Ohio
Les,

Good Idea, I'm thinking that could be done
totally with KIX. Will have to give that a try.

Rocco
_________________________
I Love this board!! -------------------- My DEV PC is running KIX 4.22 WINXP Pro

Top
#97574 - 2003-01-08 09:17 PM Re: is there a "RemoteComputerFromUser" UDF out there
Radimus Moderator Offline
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...
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#97575 - 2003-01-09 05:03 AM Re: is there a "RemoteComputerFromUser" UDF out there
krabourn Offline
Hey THIS is FUN
*****

Registered: 2000-12-11
Posts: 244
Loc: San Antonio, Texas, USA
Since no one has mentioned it, there is a program called ntname.

It is not perfect and is a command line program. If anyone ever comes up with a COM way to do this I will then switch.

Just a suggestion.
_________________________
Kelly

Top
#97576 - 2003-01-09 08:47 AM Re: is there a "RemoteComputerFromUser" UDF out there
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
The one I wrote will display information for the user, but has nothing to do with controlling how many logons a user is allowed.

My Computer Info - for Help Desk use

Get Software Inventory and System/User Information

Top
#97577 - 2003-01-09 02:26 PM Re: is there a "RemoteComputerFromUser" UDF out there
Rocco Capra Offline
Hey THIS is FUN
*****

Registered: 2002-04-01
Posts: 380
Loc: Mansfield Ohio
Thanks Doc,

I will definatly use the "My Computer Info - for Help Desk use".

Rocco
_________________________
I Love this board!! -------------------- My DEV PC is running KIX 4.22 WINXP Pro

Top
#97578 - 2003-01-11 07:52 AM Re: is there a "RemoteComputerFromUser" UDF out there
JimRobinson Offline
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
#97579 - 2003-01-11 08:04 AM Re: is there a "RemoteComputerFromUser" UDF out there
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
Jim,

No violation whatsoever. This is the General Discussion forum where just about anything you want to say can be posted here.

However, I'm not sure what the intent it. Are you posting just to show your idea, or are you looking for help?

I'm sorry, but at the moment I'm too lazy to go lookup each of these resource kit tools to see what they do. If you could please post information and links to the mentioned programs or at least what they do.

Thanks....

ps.. If your looking for help with something, please state that as well.

Top
#97580 - 2003-01-12 12:33 AM Re: is there a "RemoteComputerFromUser" UDF out there
Radimus Moderator Offline
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
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#97581 - 2003-01-11 03:38 PM Re: is there a "RemoteComputerFromUser" UDF out there
Howard Bullock Offline
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.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#97582 - 2003-01-11 04:56 PM Re: is there a "RemoteComputerFromUser" UDF out there
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
...and on that note, you could probably knock off something in perl that would fit the bill nicely.

I still see one small problem though... A lot of the users can't even tell the helpdesk what their logon ID is. If they always work from the same PC, they never have to type it in, just their password. The greatest number of calls we get that are logon related involves users not knowing their ID. It would still be useful when the ID is known.

I like NTDOC's util that you get the user to run that emails all the pertinent info.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#97583 - 2003-01-11 05:07 PM Re: is there a "RemoteComputerFromUser" UDF out there
Radimus Moderator Offline
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...
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
Page 2 of 4 <1234>


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 657 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.085 seconds in which 0.036 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org