Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++
Hey Friends
 
I am trying to run the method INetConnection::Disconnect from my Application, but it returns Access Denied untill run as Administrator.
 
If i run my Application by doing a Right Click and then select Run as Administrator, INetConnection::Disconnect works fine.
 

I am Local Administrator of my PC and if i disable or enable a network connection from
 
Control Panel\Network and Internet\Network Connections
 
it works fine and does not prompts UAC
 

Need Help.
 

Regards
Posted 12-Feb-13 20:22pm
Comments
serhiy.semenyuk at 13-Feb-13 11:05am
   
have you added correct manifest file for your application?
I believe Disconnecting a network connection would require elevated rights and your application seems to run in default mode.
vikrant kpr at 13-Feb-13 12:06pm
   
yes if i add the manifest and force the application to run with elevated access, it works fine.
On the contrary when i do the same using control panel, windows explorer does not prompts for elevated uac and hence i need a way to use the function without adding manifest.
If Control Panel does not prompts for elevated rights, why my application needs elevated access ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 400
1 Sergey Alexandrovich Kryukov 329
2 Afzaal Ahmad Zeeshan 264
3 BillWoodruff 245
4 CPallini 195
0 OriginalGriff 5,560
1 DamithSL 4,476
2 Maciej Los 3,942
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,175


Advertise | Privacy | Mobile
Web04 | 2.8.141216.1 | Last Updated 13 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100