0

One device our users have to interact with is connected to via a generic Ethernet over USB cable. After being connected to that device, the PC needs to be configured with a specific static IP adress on that virtual adapter for communication to work properly.

At this time, the configuration is done through a netsh command, run with elevated privileges, once the cable has been connected. This is problematic, since some users don't have the credentials for the administrator account on their PC.

That device is only used with a specific software that we develop, whose installation already requires elevated privileges (for a different reason). Would there be a way to pre-configure the network adapter during the software installation, so no elevated privileges is required at runtime? How?

Edited to answer bjoster's comment: I'd need to try it, but my understanding is that the netsh command is run using the interface name as argument (interface ipv4 set address name=...). Before the cable is connected, the name doesn't refer to anything. As far as I know, I can't specify the VID/PID in the netsh arguments.

2
  • Unless someone has worked with your specific adapter, it will be difficult to answer. You can try to setup registry keys and see if it works. Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces might be something look into. Try to compare the values before the adapter is plugged in and after it is plugged in. If it works, you can setup the installer of your application to add these registry keys. Again, this is a workaround, not a solution.
    – Abu Zaid
    Mar 21, 2018 at 5:52
  • What if the setup routine just ... executes the netsh commands?
    – bjoster
    Apr 4, 2018 at 13:53

0

You must log in to answer this question.

Browse other questions tagged .