0

i tried to change my ip automatically (via DHCP) described in this post: enter link description here

with this bit of code:

import wmi

# Obtain network adaptors configurations
nic_configs = wmi.WMI().Win32_NetworkAdapterConfiguration(IPEnabled=True)

# First network adaptor
nic = nic_configs[0]

# Enable DHCP
nic.EnableDHCP()

but i get returned the response value 81 as tuple : (81,) which means : "Unable to configure DHCP service." according to msdn homepage : enter link description here

I'm running the script with python 3.3.2.

need some help/advise. thanks!

Community
  • 1
  • 1
sami_analyst
  • 1,751
  • 5
  • 24
  • 43

1 Answers1

0

It looks like you are using windows 7. Make sure to run the script as administrator.

dmitry
  • 182
  • 1
  • 9