Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Copy to Program Files under Windows Vista/7

I have written a wizard in C++ which installs some files to the program files folder under windows. As I understand, I need Admin rights to write to program files under Vista/7. So my question is: Is there a way to turn on Admin rights while the application is running respectively only for one wizard page? Or do I have to start another process with Admin rights for this one wizard page?

like image 945
mgiza Avatar asked Dec 05 '25 18:12

mgiza


1 Answers

Typically you have a shield logo'd button and then shell out to another process whose manifest requests elevation.

But really it sounds like you're writing an installer so you should use something designed for that like WiX.

See also this similar question and this cited article from one of the answers thereof

like image 194
Ruben Bartelink Avatar answered Dec 08 '25 09:12

Ruben Bartelink



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!