Jump to content

Recommended Posts

Posted

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\Name

Now 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


Posted

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?

Posted (edited)

Here is the VB Script for Show Network Icon

On Error Resume Next

set 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 by glent

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...