• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Vista/7 programatic auto elevation?

cyclone3d

Fully [H]
2FA
Joined
Aug 16, 2004
Messages
18,410
I have been able to code a C++ program that is able to auto elevate itself to run as adminstrator.

It works kind of like the MS example, but has the admin username/password hard coded in the current version.

This works fine and all, but the built-in admin account must be used for the program to be able to get full admin privileges when it self elevates.

Using a regular admin account gives "sort-of" admin privileges.

I have been unable to find any examples,hints, or instructions on how to get this working without having to use the built-in admin account.

It would really help if I could get info on what exactly the UAC elevation user/pass prompt does differently since it seems to give higher privileges than just programatically self-elevating a program.
 
O.k., I guess I should make posts to help me think about how I am going about doing things more often.

I figured out how to make it work without the built in admin account.

When using CreateProcessWithLogonW, you have to make it load the profile of the admin account by using the LOGON_WITH_PROFILE flag.

http://msdn.microsoft.com/en-us/library/windows/desktop/ms682431(v=vs.85).aspx

Of course the MS documentation does not specify this as usual.
 
I have nothing to add to the information in this post but want to thank you for returning to provide the answer you found, might make it useful for others with a similar issue.
 
Back
Top