The following code works in my development computer and I am able to see that the service is registered using netsh show urlacl.
ProcessStartInfo netshPSI = new ProcessStartInfo();
// Windows XP SP3, Vista SP2, 7 SP1 or 8
netshPSI.FileName = "netsh.exe";
netshPSI.Arguments = "http add urlacl url=http://+:8731/Service1 user=Everyone";
netshPSI.CreateNoWindow = true;
Process.Start(netshPSI);
However in a target computer it executes without raising an exception and does not register. What am I missing here?
Should I wait for the process to complete?
Both computers are logged in as administrators and the code is executed with elevated rights.