From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change IP-number and Subnet-mask with LabView?

Does this work on Windows 7 with UAC enabled?

0 Kudos
Message 11 of 13
(529 Views)

@JohnShannon wrote:

Does this work on Windows 7 with UAC enabled?


It might not because you might need to be running the command prompt as an Administrator, which means LabVIEW would need to be ran as an administrator.  But you could test it out and let us know. 

0 Kudos
Message 12 of 13
(495 Views)

I didn't try it, but after further exploration I am fairly certain it still would not work.  The command prompt itself need to be run as an administrator.  This is different than just having an administrator launch a command prompt.  That will only get you a regular command prompt with no elevated rights. 

 

To get a command prompt with elevated rights, you need to be logged in as an adminstrator and then right click on a command prompt shortcut and choose "Run as administrator".  This will open a dialog which asks if you want to allow the program (the command prompt) to be allowed to made changes to the computer.  If you choose "Yes", then you get a command prompt titled "Administrator: Command Prompt", which will allow you to do things like change the computer's IP address. 

 

I have not found a way to get this "Administrator: Command Prompt" to open programmatically.  I think this is locked down on UAC enabled computers deliberately.  If there is a way to do it, then you will probably be opening a security hole on that system. 

 

We are now looking at changing our process so that we do not need to do this (change the IP address of the computer) programmatically. 

 

Thanks for the reply. 

0 Kudos
Message 13 of 13
(472 Views)