Click here to Skip to main content
14,426,997 members
Rate this:
Please Sign up or sign in to 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

Rate this:
Please Sign up or sign in to vote.

Solution 1

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
   

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




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