Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Activate the Network Tray Icon

Featured Replies

I've searched and read for hours to see if anyone posted a solution to this but didn't find any, so here is a VBscript routine I wrote a while back to do the trick. I made it into a selfcontained subroutine so you can just plop it into an existing script if you like.

This bugger drove me nuts for a while and in fact was one of the primary reasons I took up VBscript several years ago. The connection state is under a key where part of the name contains the GUID for your NIC. Thus it's different for every computer. If you have a multihomed machine, you'll need to do some tweaking to enable the tray icon for both NICs.

'**********************************************************************

'** Subroutine; Show the tray icon for the network connection        **

'**********************************************************************

Sub NetTrayIcon

Dim strComputer, objReg, strKeyPath, strShowIcon, dwShowIcon, arrSubKeys, SubKey, FullKey

Dim arrEntryNames, arrValueTypes, i, strValue

strComputer = "."

Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")

strKeyPath = "SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}"

strShowIcon = "ShowIcon"

dwShowIcon = 1

objReg.EnumKey HKLM, strKeyPath, arrSubKeys

For Each SubKey In arrSubKeys

  If SubKey <> "Descriptions" Then

FullKey = strKeyPath & "\" & SubKey & "\Connection\"

      objReg.EnumValues HKLM, FullKey, arrEntryNames, arrValueTypes

      For i=0 To UBound(arrEntryNames)

    Select Case arrValueTypes(i)       

    Case REG_SZ           

        objReg.GetStringValue HKLM, FullKey, arrEntryNames(i),strValue

        If strValue = "Local Area Connection" Then

            objReg.SetDWORDValue HKLM, FullKey, strShowIcon, dwShowIcon

        End If

        End Select

    Next

  End If

Next

End Sub

I'm noticing in preview mode that this does not look nearly as readable as in PrimalScript, but it's really not too bad in a proper editor. I just thought that I'd throw this next piece in since it's sort of topic related. A VBscript line to change the name of your network connection.
ws.Run "netsh interface set interface name = ""Local Area Connection"" newname = ""APD Network""",0, True

You can also use GreenMachines awesome batch file. It's amazingly tight for a batch file. Nice work on the VBscript too.

@ECHO OFF
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION

FOR /F "TOKENS=1 DELIMS= " %%A IN ('REG QUERY HKLM\SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}') DO (

SET TEMP1=%%A
SET TEMP2=!TEMP1:~99,38!
SET TEMP3=!TEMP2:~-1!

IF "!TEMP3!"=="}" (

IF NOT "!TEMP2!"=="{4D36E972-E325-11CE-BFC1-08002BE10318}" (

 SET REGSTR1=HKLM\SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\!TEMP2!\Connection
 SET REGSTR2=HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\!TEMP2!

 REG ADD !REGSTR1! /v ShowIcon /t REG_DWORD /d 1 /f
 REG ADD !REGSTR2! /v IPAutoconfigurationEnabled /t REG_DWORD /d 0 /f

)

)

)

Very Nice.

  • Author

Enables the tray icon for "Local Area Connection." The one you can right click on to get Disable, Status, Repair, etc.

Why go through all this hassle when this option can be specified in the winnt.sif file?

[Homenet]

ShowTrayIcon = Yes

That's too funny! :lol:

Why go through all this hassle when this option can be specified in the winnt.sif file?

[Homenet]

ShowTrayIcon = Yes

HomeNet ... Tried that in XP Pro or Windows 2000?

EDIT:: Also requires Internet Connection Sharing ... Oh Brother ...

ShowTrayIcon

Value: Yes | No

Default: Yes

Enables or disables the display of the ICS tray icon. This entry requires that EnableICS = Yes.

[Homenet]

Bridge = Adapter1,Adapter2

EnableICS = No

ShowTrayIcon = Yes

Here is my homenet section in XP and it works.

  • Author

:blushing: D'oh! Since I've never used ICS, and in fact disable it through group policy in most instances, I ASSumed that the homenet setting was to show the tray icon for ICS (is there one?).

I suppose the bright side, if there is one, is that I learned how to step through a key in order to make a change. Not sure if I'll ever need to again...

oh well..

:lol:

Kudos to both of you for the valiant effort, though :P

Oh and GM, still crying about last weekend? ;):D

Whoa, hold the phone (I cant believe I actually wrote that...)

Those icons in the system tray for networks (I have LAN, and Wireless) are NOT shown by default in WinXP SP2?!?

And, if not, this simple code in winnt.sif will enable them (but NOT ICS?)

[Homenet]
EnableICS = No
ShowTrayIcon = Yes

[edit]

I know I removed the "Bridge = Adapter1,Adapter2" line, because I THINK it creates a bridge, correct? If so, and you DISABLED ICS, whats the point of the bridge?

[Homenet]
EnableICS = No
ShowTrayIcon = Yes

Doesn't work in Windows XP Professional SP2: No Network Icon is displayed, and the box is still unchecked in Network Properties. It was a nice thought, anyway ...

@RyanVM ... and it gets worse!

@big poppa pump

not all people uses the latest M$ releases

Windows 2000 user here !

@RogueSpear, Nois3 & GM

Thanks for the scripts !

@GM

offtopic question ?

Can i add reg.exe version 2.0 from the Windows 2000 support tools to my CD source built with the last version of XPcreate using the new functionality ?

A User defined FILESCD folder may now be used in conjunction with the XPCREATE FILESCD directory.

My needs is to add some M$ files (reg.exe wntipcfg.exe msconfig.exe) to this folder and let them added in dosnet.inf file and compressed in the I386 folder) without using $oem$\$$\system32 method ?

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.