Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I love the structure of the site. You start at the top, and drill down to what you want. Maybe I've been using Unix too long... :-) "

Geography

Where in the world do Tek-Tips members come from?

possible script to identify ipaddress?Helpful Member!(2) 

techwiggle (TechnicalUser)
19 Aug 09 5:18
here is in a nutshell what I'm trying to do:

I would like to have a script that will go out and check username to computername and output results with IPaddress of computername.

so like  
1. I enter username of user in input box

2. that username should be compared (or mapped) to the computername for that user (usually includes username in part of computername)

3. need to either pass the computername info into a poup box or better yet the ipaddress of the computername into a popup box. (so there would be a ping reauest going on and the output would then be displayed in window)


the reason behind this is that I would like to have the ipaddress information so I don't have to ask the user for the IPaddress information (cuz half the time they don't know where to go) overall this should save some time.

any suggestions on how to go about it would be greatly appreciated.

 
Helpful Member!(2)  RobertKaucher (MIS)
21 Aug 09 9:00
You should actually look into LanSweeper. I use it for this. I put in the users name into the search field hit enter and it shows me properties regarding the user including the system they are currently logged into. I then just click the computer name link and then the VNC link and it opens a VNC session to the user's PC. I even created a batchfile that silently installs VNC and sets it to run as a system service.

The problem with your idea for the script is that it would first have to use WMI to query for the logged on user of every PC in you domain. This could cause a ton of network traffic. There is no way to really do this query in reverse that I am aware of.

Lansweeper has a client application that you set to run (invisible to the user) as a logon script. It works great for what you want.
Zelandakh (MIS)
23 Aug 09 5:27
Thanks for the suggestion Robert - I'd not come across that app before so I'm giving you a little purple star smile
RobertKaucher (MIS)
23 Aug 09 10:50
If you would like any of my batch scripts for installing VNC let me know.
techwiggle (TechnicalUser)
24 Aug 09 0:51
this is great, Thanks a ton. and what I really like about the product is that is it one of best four letter words "FREE"!

I'd be interested in the batch for VNC install... bigears
RobertKaucher (MIS)
24 Aug 09 9:55
Let me get them together and remove all the identifying info and document them a little and I will post them. They were really quick and dirty, so there are probably far better ways to accomplish what they do, but they work!
RobertKaucher (MIS)
27 Aug 09 10:19
I am going to redo this to use powershell, but I have three batch files that I use. You will need PSExec for these to work. You will need to create the reg files from a machine that you have previously installed TigthVNC on already. These are documented on the TightVNC site. I use the pings just to waste time to be sure the action has completed. They may not be needed.

########## The 1st File  #######

psexec \\computername -u domain\administrator -c K:\admin\remote_copy.cmd
psexec \\computername  -u domain\administrator -c K:\admin\vnc_install.cmd
pause


######### The 2nd File ###############

mkdir C:\temp\
copy \\fileservername\apps\vnc\tightvnc-1.3.10-setup.exe C:\temp\tightvnc-1.3.10-setup.exe
copy \\fileservername\apps\vnc\vnc1.reg C:\temp\vnc1.reg
copy \\fileservername\apps\vnc\vnc2.reg C:\temp\vnc2.reg


######### The 3rd File ###############

C:\MWGTemp\tightvnc-1.3.10-setup.exe /sp- /verysilent
regedit /s C:\temp\vnc1.reg
regedit /s C:\temp\vnc2.reg
ping 192.168.1.254
ping 192.168.1.254

"C:\program files\TightVNC\WinVNC.exe" -install
ping 192.168.1.254
ping 192.168.1.254
ping 192.168.1.254
ping 192.168.1.254
ping 192.168.1.254
ping 192.168.1.254
ping 192.168.1.254
ping 192.168.1.254
net start "vnc server"
techwiggle (TechnicalUser)
9 Sep 09 0:33
awesome.

thanks a million
markdmac (MIS)
12 Sep 09 6:50
This question seems to be answered to the OPs satisfaction, I just want to point out that in my login script FAQ I do give some code to record what computer a user is currently logged into.  This requires a SQL database exist somewhere on your network, but it is a simple solution for recording logon and logoff conditions and would also serve the purpose of identifying which PC a user is currently logged into. 329-5798

I hope you find this post helpful.  

Regards,

Mark

Check out my scripting solutions at http://www.thespidersparlor.com/vbscript

Work SMARTER not HARDER.  The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier!  Save time, get more work done, get the Admin Script Pack.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close