bigboss200000
Messages postés10Date d'inscriptionjeudi 30 septembre 2004StatutMembreDernière intervention21 juin 2005
-
20 juin 2005 à 10:31
bigboss200000
Messages postés10Date d'inscriptionjeudi 30 septembre 2004StatutMembreDernière intervention21 juin 2005
-
20 juin 2005 à 15:31
bonjour.
je souhaite modifier l'adresse ip d'un pc soit par wmi soit par une commande systeme
dans un script vbs
voici la
commande systeme:
Set objShell = CreateObject("WScript.Shell")
strCommand = "cmd /c netsh interface ip set ""LAN"" static 10.1.8.245 255.0.0.0 10.1.20.254 2"
Set objExecObject = objShell.Exec(strCommand)
aucune des deux methodes fonctionnent.avez vous un script???
question hors sujet:savez vous comment on fait pour connaitre le nom de l'interface d'une carte reseau!!!
merci beaucoup!!
For Each objNetAdapter in colNetAdapters
errEnable = objNetAdapter.EnableStatic(strIPAddress, strSubnetMask)
errGateways = objNetAdapter.SetGateways(strPasserelle, strGatewaymetric)
If errEnable = 0 Then
WScript.Echo "The IP address has been changed."
Else
WScript.Echo "The IP address could not be changed."
End If
Next