![]() SetDWORDValue HKLM, strShowNicKeyName & strNICguid & "\Connection", "ShowIcon", ShowNicdwValue objReg. Caption, 6, 4 ) 'Get the DeviceID of the NIC 'Change the "Show icon in notification area when connected value" objReg. ![]() SettingID 'Get the GUID of the NIC strDeviceID = Mid ( objNetCard. ExecQuery ( "Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True" ) 'Make changes on the NICs that have IP enabled For Each objNetCard in arrayNetCards strNICguid = objNetCard. '************************************************************************ '* VBS Script to: '* Enable/Disable showing the icon in your system tray for connected NICs '* Enable/Disable Power Management for Connected NICs '************************************************************************ 'Let's setup our variables Const HKLM = & H80000002 'HKEY_LOCAL_MACHINE info for registry writes Dim objReg 'Registry Object Dim objWMIService 'WMI Service Object Dim arrayNetCards 'Array of all connected NICs Dim objNetCard 'A specific NIC Dim strNICguid ' Dim strShowNicKeyName 'Key Specific to the Network Adapters in CurrentControlSet Dim strShowNicKeyName001 'Key Specific to the Network Adapters in CurrentControlSet001 Dim strPnPCapabilitesKeyName 'Key Specific to the Network Adapters in CurrentControlSet Dim strPnPCapabilitesKeyName001 'Key Specific to the Network Adapters in CurrentControlSet001 Dim strComputer 'Name of computer to modify strComputer = "." 'Period = local computer strShowNicKeyName = "SYSTEM\CurrentControlSet\Control\Network\!\\" & strComputer & "\root\cimv2" ) 'Look for the NICs that have IP enabled Set arrayNetCards = objWMIService. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |