If the script is executing on the "machine with IP address to be changed"
then this might work:

after making the ip address changes, you should be able to disable and
re-enable the NIC with WMI, through the hardware namespace.


if the WMI script is not running on the "machine with IP address to be
changed", and is managing the remote machine over the network...then once
the IP address is "touched" the script will most likely error out and no
further commands can be sent to the remote machine with the current
connection that WMI is using.



-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] Behalf Of Peter Osucha
Sent: Wednesday, March 19, 2008 11:50 AM
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: [ADVANCED-DOTNET] WMI and updating ip addresses


Hi Guys,

I've been reviewing a few online examples of programmatically setting a
machine to have a Static IP address.  The code seems to complete with no
errors - however, the ip address never changes.  Before I post any code,
a basic question...

The machine of interest doesn't have a keyboard/mouse/monitor - so I'm
watching what happens over an UltraVNC connection.  I imagine that if I
set the machine to have a static ip address, it won't actually have that
address until the next restart of the computer.  Is that correct?

Peter

(I imagine I'll be posting code shortly).

===================================
This list is hosted by DevelopMentor.  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to