Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; @AZJIO
- #include <Array.au3>
- ; $sPathWindows = FileSelectFolder('Указать каталог Windows', '')
- ; If @error Then Exit
- ; Run(@ComSpec & ' /C REG LOAD HKLM\LM_SOFTWARE"' & $sPathWindows & '\system32\config\software"', '', @SW_HIDE)
- $i = 1
- Global $aKey[1][6] = [[0]]
- While 1
- $sKey = RegEnumKey('HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services', $i)
- If @error Then ExitLoop
- If StringLeft($sKey, 1) = '{' And _RegExists('HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\' & $sKey & '\Parameters\Tcpip') Then
- $aKey[0][0] += 1
- ReDim $aKey[$aKey[0][0] + 1][6]
- $aKey[$aKey[0][0]][0] = RegRead('HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\' & $sKey & '\Parameters\Tcpip', 'DefaultGateway')
- $aKey[$aKey[0][0]][1] = RegRead('HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\' & $sKey & '\Parameters\Tcpip', 'IPAddress')
- $aKey[$aKey[0][0]][2] = RegRead('HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\' & $sKey & '\Parameters\Tcpip', 'SubnetMask')
- $aKey[$aKey[0][0]][3] = RegRead('HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\' & $sKey & '\Parameters\Tcpip', 'DhcpIPAddress')
- $aKey[$aKey[0][0]][4] = RegRead('HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\' & $sKey & '\Parameters\Tcpip', 'DhcpServer')
- $aKey[$aKey[0][0]][5] = RegRead('HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\' & $sKey & '\Parameters\Tcpip', 'DhcpSubnetMask')
- EndIf
- $i += 1
- WEnd
- _ArrayDisplay($aKey, 'aKey')
- Func _RegExists($sKey)
- RegRead($sKey, '')
- Return Not (@error > 0)
- EndFunc ;==>_RegExists
- ; HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement