Way back in 08 I received good advice from this forum on how to set IP addresses in code using WMI
This works well setting a static address but I can't see how to easily set the computer back to a dynamic condition.
Once a static address has been set, IPConfig/release in the command window brings up an error "The operation failed as no adapter is in the state permissible for this operation.
It only sets IPs to 0.0.0.0 without error if the computer is already in dynamic. (using XP)
Rather than use a shell anyway, is there a way to set back to dynamic using WMI?
This works well setting a static address but I can't see how to easily set the computer back to a dynamic condition.
Once a static address has been set, IPConfig/release in the command window brings up an error "The operation failed as no adapter is in the state permissible for this operation.
It only sets IPs to 0.0.0.0 without error if the computer is already in dynamic. (using XP)
Rather than use a shell anyway, is there a way to set back to dynamic using WMI?