mf_2 Posted July 4, 2007 Posted July 4, 2007 Hey guys,I have a small problem:I want to change the primary LAN connection's name in my unattended installation DVD. I located the registry key here:HKLM\SYSTEM\CurrentControlSet\Control\Network\{some large number}\{some-other-large-number}\Connection\NameNow my question is: How can I get the values for those large numbers? Can I do it with a batch file or by reading some registry values?They seem to differ on every computer. Please reply quickly!Best regards,mf_2
glent Posted July 4, 2007 Posted July 4, 2007 (edited) This works great for me , its a vbs script http://www.microsoft.com/technet/scriptcen...05/hey0511.mspxI run call the Vbs in a batch file using this commandcscript //B //Logo "Pathtofile" Edited July 4, 2007 by glent
mf_2 Posted July 4, 2007 Author Posted July 4, 2007 Thanks a lot for that script!!! Is there a way of passing a variable to that script when calling it from within a batch file via cscript?Also, I want to set the ShowIcon to '1', so that the connection's icon shows up in the lower right taskbar whenever there is a network plugged in. Cabn I do that in VB too?
glent Posted July 4, 2007 Posted July 4, 2007 (edited) Here is the VB Script for Show Network Icon On Error Resume Nextset ws = WScript.CreateObject("WScript.Shell")start = "HKLM\SYSTEM\CurrentControlSet"classGUID = ws.RegRead(start & "\Enum\Root\MS_NDISWANIP000\ClassGUID")netID = ws.RegRead(start & "\Control\Class\" & classGUID & "000\NetCfgInstanceID")ws.RegWrite start & "\Control\Network\" & classGUID & "\" & netID & "\Connection\ShowIcon", 1, "REG_DWORD"MsgBox "Show icon in Notification Area when connected is set.", 4096,"Finished"For Variables Im not sure sorry Edited July 4, 2007 by glent
Yzöwl Posted July 4, 2007 Posted July 4, 2007 With regard showing network icons in the system tray, I answered a question recently, using batch code, which does exactly that.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now