Page 1 sur 1

Récupéré l'IP en formules

MessagePublié: 07 Mars 2011 à 13:12
par Michael DELIQUE
Steph_ a écrit:je viens de tester ça sur environ 150 machines en XP, et pour le moment ça marche à 100%


[syntax="Formula"]keywin := @RegQueryValue("HKEY_LOCAL_MACHINE"; "SYSTEM\\ControlSet001\\Services\\RemoteAccess\\Interfaces\\2"; "InterfaceName");
deb := "SYSTEM\\ControlSet001\\Services";
fin := "Parameters\\Tcpip";
@RegQueryValue("HKEY_LOCAL_MACHINE"; deb +"\" +keywin+"\"+fin; "DhcpIpAddress")[/syntax]

MessagePublié: 08 Mars 2011 à 16:32
par Michael DELIQUE
je me suis amusé à faire un pseudo ipconfig en @formule

Code : Tout sélectionner
keywin := @RegQueryValue("HKEY_LOCAL_MACHINE"; "SYSTEM\\ControlSet001\\Services\\RemoteAccess\\Interfaces\\2"; "InterfaceName");

"DhcpIpAddress: "+@RegQueryValue("HKEY_LOCAL_MACHINE"; "SYSTEM\\ControlSet001\\Services\\" +keywin+"\\Parameters\\Tcpip"; "DhcpIpAddress")+@NewLine+
"DhcpDefaultGateway : "+@RegQueryValue("HKEY_LOCAL_MACHINE"; "SYSTEM\\ControlSet001\\Services\\" +keywin+"\\Parameters\\Tcpip"; "DhcpDefaultGateway")+@NewLine+
"DhcpServer : "+@RegQueryValue("HKEY_LOCAL_MACHINE"; "SYSTEM\\ControlSet001\\Services\\" +keywin+"\\Parameters\\Tcpip"; "DhcpServer")+@NewLine+
"DhcpSubnetMask : "+@RegQueryValue("HKEY_LOCAL_MACHINE"; "SYSTEM\\ControlSet001\\Services\\" +keywin+"\\Parameters\\Tcpip"; "DhcpSubnetMask")+@NewLine+
"IPAddress : "+@RegQueryValue("HKEY_LOCAL_MACHINE"; "SYSTEM\\ControlSet001\\Services\\" +keywin+"\\Parameters\\Tcpip"; "IPAddress")+@NewLine+
"SubnetMask : "+@RegQueryValue("HKEY_LOCAL_MACHINE"; "SYSTEM\\ControlSet001\\Services\\" +keywin+"\\Parameters\\Tcpip"; "SubnetMask")+@NewLine+
"ComputerName : "+@RegQueryValue("HKEY_CURRENT_USER";"Software\\Microsoft\\Windows Media\\WMSDK\\General"; "ComputerName")+@NewLine+
"DhcpDomain : "+@RegQueryValue("HKEY_LOCAL_MACHINE"; "SYSTEM\\ControlSet003\\Services\\Tcpip\\Parameters\\Interfaces\\" +keywin; "DhcpDomain")+@NewLine+
"NameServer : "+@RegQueryValue("HKEY_LOCAL_MACHINE"; "SYSTEM\\ControlSet003\\Services\\Tcpip\\Parameters\\Interfaces\\" +keywin; "NameServer")+@NewLine+
"Domain : "+@RegQueryValue("HKEY_LOCAL_MACHINE"; "SYSTEM\\ControlSet003\\Services\\Tcpip\\Parameters\\Interfaces\\" +keywin; "Domain")+@NewLine+
"DhcpServer : "+@RegQueryValue("HKEY_LOCAL_MACHINE"; "SYSTEM\\ControlSet003\\Services\\Tcpip\\Parameters\\Interfaces\\" +keywin; "DhcpServer")+@NewLine+
"DhcpIPAddress : "+@RegQueryValue("HKEY_LOCAL_MACHINE"; "SYSTEM\\ControlSet003\\Services\\Tcpip\\Parameters\\Interfaces\\" +keywin; "DhcpIPAddress")+@NewLine+
"DhcpSubnetMask : "+@RegQueryValue("HKEY_LOCAL_MACHINE"; "SYSTEM\\ControlSet003\\Services\\Tcpip\\Parameters\\Interfaces\\" +keywin; "DhcpSubnetMask")+@NewLine+
"DhcpNameServer : "+@RegQueryValue("HKEY_LOCAL_MACHINE"; "SYSTEM\\ControlSet003\\Services\\Tcpip\\Parameters\\Interfaces\\" +keywin; "DhcpNameServer")+@NewLine+
"DhcpDomain : "+@RegQueryValue("HKEY_LOCAL_MACHINE"; "SYSTEM\\ControlSet003\\Services\\Tcpip\\Parameters\\Interfaces\\" +keywin; "DhcpDomain")