Sign in to follow this  
Followers 0
Simplify iT

enable network icon

5 posts in this topic

Hi all,

Have been playing around with different programming option to automatically enable to network connection icon in the notification area without much success... I would like some help with a script that will enable this for me when at first logon - would more than likely put it in the runonceex area....

suggestions, and help very much appreciated!

post-11823-1199599569_thumb.jpg

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Is it stored in register, yes it is!

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\{AE15441C-455A-4DD5-B057-C01BF6C17E41}\Connection

http://www.google.nl/search?client=firefox...G=Google+zoeken

Use Regwrite enc to work with it :)

@below:

De Nederlanders schieten wel weer te hulp >.<

Edited by xzaz

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hi Simplify iT

You'll have to create an array of the following registry key

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}

Below this value are your networkcards stored, under these values there is a Key Connection

ShowIcon - REG_DWORD - 0 (HEX) = No icon

ShowIcon - REG_DWORD - 1 (HEX) = Show icon

There is only one thing i don't know the anwser off.. how to apply this Whitout reboot

i should be something with DllCall .. but which dll i don't know

Is it stored in register, yes it is!

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\{AE15441C-455A-4DD5-B057-C01BF6C17E41}\Connection

http://www.google.nl/search?client=firefox...G=Google+zoeken

Use Regwrite enc to work with it

The value {AE15441C-455A-4DD5-B057-C01BF6C17E41} in your example is based on your networkcard not on his

Edited by Emiel Wieldraaijer

Best regards,Emiel Wieldraaijer

Share this post


Link to post
Share on other sites

Hi all,

Have been playing around with different programming option to automatically enable to network connection icon in the notification area without much success... I would like some help with a script that will enable this for me when at first logon - would more than likely put it in the runonceex area....

suggestions, and help very much appreciated!

Try this:

FindRegValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}", "Connection", "ShowIcon")

Switch @error
Case 1
    MsgBox(16, "Error", "Required key not found")
Case 2
    MsgBox(16, "Error", "Required value not found")
Case 3
    MsgBox(16, "Error", "unable to open requested value")
EndSwitch

Func FindRegValue($StartKey, $key, $value)
    Local $RegKey, $RegVal, $read, $i, $sRet, $type
    For $i = 1 To 100
        $RegKey = RegEnumKey($StartKey, $i)
        If @error Then Return SetError(1)
        
        If StringInStr($RegKey, $key) Then
            For $j = 1 To 100
                $RegVal = RegEnumVal($StartKey &"\"& $RegKey, $j)
                If @error Then Return SetError(2)
                
                If StringInStr($RegVal, $value) Then
                    $read = RegRead($StartKey &"\"& $RegKey, $value)
                    If @error Then Return SetError(3)
                    $type = @extended
                    Switch $read
                    Case 0
                        If MsgBox(68, "Question", "Enable network icon?") = 6 Then RegWrite($StartKey &"\"& $RegKey, $value, GetExtendedType($type), 1)
                        Exit
                    Case 1
                        If MsgBox(68, "Question", "Disable network icon?") = 6 Then RegWrite($StartKey &"\"& $RegKey, $value, GetExtendedType($type), 0)
                        Exit
                    EndSwitch
                EndIf
            Next
        Else
            $sRet = FindRegValue($StartKey &"\"& $RegKey, $key, $value)
        EndIf
    Next
EndFunc

Func GetExtendedType($Extended)
    Local $RegTypeArr[6] = [5, "REG_SZ", "REG_MULTI_SZ", "REG_EXPAND_SZ", "REG_DWORD", "REG_BINARY"]
    For $i = 1 To 5
        If $Extended = $i Then Return $RegTypeArr[$i]
    Next
EndFunc

But you need restart computer after change value.

@xzaz

Is it stored in register, yes it is!

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\{AE15441C-455A-4DD5-B057-C01BF6C17E41}\Connection

http://www.google.nl/search?client=firefox...G=Google+zoeken

Use Regwrite enc to work with it

@Emiel Wieldraaijer

The value {AE15441C-455A-4DD5-B057-C01BF6C17E41} in your example is based on your networkcard not on his

You are right!

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0