voorock Posted November 27, 2006 Share Posted November 27, 2006 I need to convert an adress ip for create a reg binary key in the registry.These concern Alternative configuration IP.How can I do for ?If I have this information in my script :IP :192.168.20.0Mask : 255.255.255.0 What function for convert these in a reg binary key or hexa.Thanks very much for yours solutionsTo resume how can i obtain the red value in the reg key, with IP and Mask. Dim $StrGUID, $Key$IP = ("192.168.100.0")$Mask = ("255.255.255.0");Read service name of the network card$Key = RegEnumKey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\", 1) If @error <> 0 then ExitLoop$StrGUID = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\" & $Key, "ServiceName");Activate Alternate ConfigurationRegWrite("HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\" & $StrGUID, "ActiveConfigurations", "REG_MULTI_SZ", "Alternate_" & $StrGUID);Paramétrer Alternate Configuration avec Adresse IP et Masque;Write the value"Options" sous HKLM\SYSTEM\CurrentControlSet\Services\Dhcp\ConfigurationsRegWrite("HKLM\SYSTEM\CurrentControlSet\Services\Dhcp\Configurations\", "Options", "REG_BINARY", "32000000000000000400000000000000FFFFFF7FC0A800B701000000000000000400000000000000FFFFFF7FFFFFFF00");Write the key Alternate_{Valeur ServiceName} and the value "Options" under HKLM\SYSTEM\CurrentControlSet\Services\Dhcp\Configurations\RegWrite("HKLM\SYSTEM\CurrentControlSet\Services\Dhcp\Configurations\Alternate_" & $StrGUID, "Options", "REG_BINARY", "32000000000000000400000000000000FFFFFF7FC0A800B701000000000000000400000000000000FFFFFF7FFFFFFF00")MsgBox(64, "Alternate Configuration", "Configuration alternative is OK with IP 192.168.100.0 and Mask 255.255.255.0") Link to comment Share on other sites More sharing options...
NeoFoX Posted November 27, 2006 Share Posted November 27, 2006 The included functions Hex() and Dec() in AutoIt perhaps?HexDecNeo [center][font="Arial"]--- The Neo and Only --- [/font][font="Arial"]--Projects---[/font]Image to Text converterText to ASCII converter[/center] 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