1

I require to be able to programmatically change an IP address without the need for admin rights on the end user PC.

The methods I have already attempted are: NETSH commands AddIPAddress - http://msdn.microsoft.com/en-gb/library/windows/desktop/aa365801(v=vs.85).aspx

and .NET management class using the Win32_NetworkAdapterConfiguration class How can you change Network settings (IP Address, DNS, WINS, Host Name) with code in C#

It just seems there is no way at runtime to accomplish this, I have read about using a batch file at start up to create the necessary permissions or enabling UAC but both of these are not possible for the end user.

Cheers :)

Community
  • 1
  • 1
  • I would certainly *hope* there isn't a way to do this. If there was, it would be potentially serious security risk. – Stephen C Jul 22 '14 at 13:54
  • 1
    You can't do that, and *shouldn't be able* to do that, without administrator right. – Some programmer dude Jul 22 '14 at 13:54
  • This is exactly what I think, it's quite a silly requirement really. I thought I would ask the world if there may be any extremely low level way to achieve this. – edwin the duck Jul 22 '14 at 14:02
  • Just imagine what a virus could do if it was able to change your IP Address (well it could if it runs under the admin account)... – Jportelas Jul 22 '14 at 14:28
  • Assume it was possible; it would be a elevation of privilege bug and patched in next month's security update. (Unless you target just XP of course) – MSalters Jul 23 '14 at 07:16
  • Why are you looking to change IP address? Even if it was possible it smells of a bad way of doing things - there must be a more reliable way to accomplish your business goals I would have thought. – SilverlightFox Jul 23 '14 at 09:20
  • Do you know any other way to change IP address of system? I have a software in php, in which we provide all the netwrok settings(IP address, gatway etc) in GUI. I just want to change these settings to system. – Vivacity InfoTech Apr 01 '15 at 14:06

0 Answers0