Simplify iT Posted January 6, 2008 Share Posted January 6, 2008 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! Link to comment Share on other sites More sharing options...
xzaz Posted January 6, 2008 Share Posted January 6, 2008 (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}\Connectionhttp://www.google.nl/search?client=firefox...G=Google+zoekenUse Regwrite enc to work with it @below:De Nederlanders schieten wel weer te hulp >.< Edited January 6, 2008 by xzaz Small Color Picker v0.2 | Travian bot Link to comment Share on other sites More sharing options...
Emiel Wieldraaijer Posted January 6, 2008 Share Posted January 6, 2008 (edited) Hi Simplify iTYou'll have to create an array of the following registry keyHKEY_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 iconShowIcon - REG_DWORD - 1 (HEX) = Show iconThere 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}\Connectionhttp://www.google.nl/search?client=firefox...G=Google+zoekenUse Regwrite enc to work with itThe value {AE15441C-455A-4DD5-B057-C01BF6C17E41} in your example is based on your networkcard not on his Edited January 6, 2008 by Emiel Wieldraaijer Best regards,Emiel Wieldraaijer Link to comment Share on other sites More sharing options...
xzaz Posted January 6, 2008 Share Posted January 6, 2008 Its a kick in the right direction. Small Color Picker v0.2 | Travian bot Link to comment Share on other sites More sharing options...
rasim Posted January 7, 2008 Share Posted January 7, 2008 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: expandcollapse popupFindRegValue("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 hisYou are right! Link to comment Share on other sites More sharing options...
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