Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show username, hostname, and IP address on desktop

Status
Not open for further replies.

zpetersen

MIS
Dec 29, 2003
58
US
I would be interested to know if anyone has ever done anything like this. This is something I would like to do in order to aid troubleshooting etc. When someone calls with an issue and I want to remote into their machine all I have to do is ask them what their screen lists for Hostname etc.

I would like to be able to apply this via GPO and I would imagine it would have to be done with some kind of scripting like VBScript.

I was browsing through the logon script faq FAQ329-5798 and noticed this little bit of code:

Code:
'Configure the PC to show the Windows Version and Service Pack
'as an overlay to the desktop above the System Tray
'=====================================
HKEY_CURRENT_USER = &H80000001
strComputer = WSHNetwork.Computername
Set objReg = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "Control Panel\Desktop"
objReg.CreateKey HKEY_CURRENT_USER, strKeyPath
ValueName = "PaintDesktopVersion"
dwValue = 1
objReg.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, ValueName, dwValue

Im wondering if there is a way to add to or chang the information that is used above. Anyone have any ideas? Or have you done anything similar?
 
Unfortunately it can't be done natively. (we will see what Vista lets us do). You can however do the job with Sysinternals BGINFO which is a free utility.

I hope you find this post helpful.

Regards,

Mark
 
i think one can set someones background to be an html file, this html file can contain active content.
this would probably mean that the users would have keep your special background all the while which i am sure they wont be pleased about....

a couple of alternatives

1. have every machine have a shortcut in Startmenu, this shortcut points to a vbscript whcih is a msgbox of useful info helpdesks want, get the user to go Start\MIS Info.lnk...or whatever, or you do when you remotecontrol

2. beat the user to it. have your logonscript audit centrally, therefore when a user logs on an audit file is autogenerated. therefore when a user rings in you can simply open their logonscript audit file and you have as much info as you want to shake a stick at or you want to put in your logonscript. this is then controlled centrally and you dont have to maintain scripts/html files etc on the local machine and the user has to do nothing...

...you can probably tell which one i prefer...or both perhaps
 
mrmovie, Im liking the sound of #2... heck.. #1 would even be a viable alternative. I dont know that I am ready to restrict background images yet... I just hit them with a bunch of restrictions over the weekend with the Novell to Microsoft migration.... mobs, pitchforks, torches, etc.
 
How about this:

' ' '===============================================================================================================
' ' ' Situation: Display Popup box with Username, ComputerName and Domain Information.
' ' '---------------------------------------------------------------------------------------------------------------
' ' 'To make debugging easier use the Explicit declaraton of variables option. This section is
' ' ' included if this is to be snipped for stand alone code. If Option Explicit has not been
' ' ' enabled un-comment the following line.
Option Explicit 'Does not allow variables that are not declared using the Dim or Const statements to be used.
' ' 'If the WScript.Shell object has not ben instanced, un-comment the following 2 lines.
Dim Shell 'This establishes the variable Shell that will become the WScript.Shell object.
Set Shell = CreateObject("WScript.Shell")'Establish the WScript.Shell object: Shell
Dim objNetwork
Set objNetwork = CreateObject("WScript.NetWork")
Dim strInfo
strInfo = "UserName: " & objNetwork.UserName & vbCRLF & "ComputerName: " & objNetwork.ComputerName & vbCRLF & "DomainName: " & objNetwork.UserDomain
MsgBox strInfo

Hope this helps-

Brandon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top