Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi,My application using manifest file and using admin privilege like below

HTML
<requestedexecutionlevel level="requireAdministrator" uiaccess="false" />


This privilege blocking my application launching on start up.The admin privilege is necessarily required and i need to launch the application in start up.When i remove this privilege the starting launch is working.


Regards

jayesh
Posted
Updated 29-Jul-14 16:39pm
v3
Comments
ZurdoDev 29-Jul-14 12:13pm    
So what is the question?
Sergey Alexandrovich Kryukov 29-Jul-14 22:43pm    
Not a question. Now, startup of what? There are several different meaning of "startup". Why doing such thing; what are you trying to achieve?
Of course the application cannot start on certain phase of startup, just because there is no one who would elevate the privilege...
—SA

Please see my comment to your post: it is not a question and not quite clear. However, probably this is the hint you need: there is no a way to work around UAC. If it was possible, who would need it? So, there is no a way to create any artifact such as a program, to bypass the UAC dialog requesting the user to elevate privileges. When you embed the application manifest requesting elevation of the privileges, it simply means that the UAC request dialog should be shown immediately, so the user would not need to use "Run As Administrator" menu item; the request dialog will be shown in all cases. Please see:
http://msdn.microsoft.com/en-us/library/bb756929.aspx[^].

I don't know how you "auto-run" the application, but there are phases when there is no a user who would get that request.

See also: http://en.wikipedia.org/wiki/User_Account_Control[^].

Perhaps, to figure what to do, you need to explain your ultimate goal, explain what kind of security do you want to achieve. It could be possible that your whole idea is wrong, in general terms.

—SA
 
Share this answer
 
Comments
Richard Deeming 30-Jul-14 7:10am    
Windows automatically blocks all elevated startup applications (applications in the "Startup" folder of the start menu, and applications listed under the various "Run" registry keys).

This is a well known and documented problem, with a very simple solution: use the Task Scheduler to launch the elevated application when the user logs in.
Sergey Alexandrovich Kryukov 30-Jul-14 16:17pm    
Ha! I did not think about this possibility. Strictly speaking, what I said is still correct; your solution is reduced to the permission of the Windows Task Scheduler, and the permissions of the applications are irrelevant (so no manifest embedding with requireAdministrator is really needed). But in practice this is really a solution, appreciate it.
—SA
 
Share this answer
 
Comments
Richard Deeming 30-Jul-14 7:06am    
Oh, very nice: a down-vote without a comment on an answer which solves the original question.

Would the anonymous coward care to come forward and explain that? >:(
Sergey Alexandrovich Kryukov 30-Jul-14 16:20pm    
No way. Cowards won't ever come back, no matter how much you try to provoke them. But decent people who just make mistakes tend to admit them, in response to some convincing arguments. I, for example, misread this solution at first. Not all posts even deserve comments (a good number of members just fool around here, unfortunately), but your answer certainly deserve commenting. Voted 5.
—SA

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900