Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi,

I am calling a windows C# developed EXE from my main application (C#) to register the main application. (Needed to make another EXE since it needs elevated privileges)
And, for avoiding it to open directly by the customer, I am sending a password to the exe as command line argument.
But the problem is that, When UAC messages shows for elevated privilege, It shows the whole path along with the password I sent, How can I avoid this, Please help me thanks
Posted

1 solution

Bad idea, the one with extra executable. Generally, if you are using some *.EXE for the purpose other then letting the user to start an application, this is already a sign of wrong architecture. At least it could be renamed from *.EXE to something else (it would not change its functionality), but this is not a real solution…

You can automatically request elevated privileges by adding and embedding appropriate application manifest. This is explained here:
http://msdn.microsoft.com/en-us/library/bb756929.aspx[^].

Of course, you cannot bypass UAC (it would defeat its purpose), but you can switch it off, which I would strongly discourage.

—SA
 
Share this answer
 

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