10-17-2021 06:41 PM
Hi,
So I am trying to programmatically change the IP address and subnet mask of a USB to ethernet adapter for a test system. I have developed a string for the command that I have tested using cmd.exe to prove that it works. The structure of the command is: runas /netonly /user:admin netsh interface ip set address name="Ethernet" static ###.###.###.### ###.###.#.# where ###.###.###.### is the IP address I want to set and ###.###.#.# is the subnet mask.
Is there way to send this command with elevation or administrative rights through TestStand? I either have to be able to send the admin password in the same cmd window (Standard Output of Execute Command returns string telling me to enter password for admin) via TestStand or send the original command with rights. I have looked for hours for a solution, but have had no luck.
Thanks
10-17-2021 10:08 PM
If you run TestStand as Administrator then whatever TS calls will run with admin privileges.
As per my understanding, a lower privilege application cannot execute another application with a higher privilege.
10-18-2021 09:28 AM
Thanks for the reply, however, in my case, this will not work because the person who will operate the TestStand program will no be someone with higher privileges.