Hi,
I've resisted for a long time, but laptops with Windows 7 have started trickling into my company, and my code must work with them. Most does of course, but I need some help.
The actual project I'm working on adds a route to the IPv4 Route Table after the user has made a VPN connection. In WinXP, this was no problem, as I just used WinExec to call the "ROUTE ADD..." command. Under Windows 7, this fails because "The requested operation requires elevation".
I can get past this by having the shortcut for my program flagged to run as the administrator, but then this prompts the UAC window asking for confirmation every time the shortcut is run. I could lower the UAC settings, but I would prefer to work with them at this point.
My options:
[ul][li]Find a way to add to the IPv4 Route Table another way that doesn't trip the UAC[/li]
[li]Find a way to have my program run as the administrator, in a way that doesn't trip the UAC[/li][/ul]
Can anyone give me some help?
I've resisted for a long time, but laptops with Windows 7 have started trickling into my company, and my code must work with them. Most does of course, but I need some help.
The actual project I'm working on adds a route to the IPv4 Route Table after the user has made a VPN connection. In WinXP, this was no problem, as I just used WinExec to call the "ROUTE ADD..." command. Under Windows 7, this fails because "The requested operation requires elevation".
I can get past this by having the shortcut for my program flagged to run as the administrator, but then this prompts the UAC window asking for confirmation every time the shortcut is run. I could lower the UAC settings, but I would prefer to work with them at this point.
My options:
[ul][li]Find a way to add to the IPv4 Route Table another way that doesn't trip the UAC[/li]
[li]Find a way to have my program run as the administrator, in a way that doesn't trip the UAC[/li][/ul]
Can anyone give me some help?