Wrote a liitle application which works great with XP.
I use a checkbox to install the program to c:\programs\..., just a copy-installation.
As a normal user with VISTA you are not allowed to write anything to c:\programs.
Of course i can include a manifest to make sure the program runs only with administrative rights, but for normal operation a normal user has enough rights.
Now my thought is: i would disable the installation checkbox, if the program runs with normal user rights, when started as administrator the checkbox will be enabled. But how can i determine at runtime if the current user has administrative rights?
I use a checkbox to install the program to c:\programs\..., just a copy-installation.
As a normal user with VISTA you are not allowed to write anything to c:\programs.
Of course i can include a manifest to make sure the program runs only with administrative rights, but for normal operation a normal user has enough rights.
Now my thought is: i would disable the installation checkbox, if the program runs with normal user rights, when started as administrator the checkbox will be enabled. But how can i determine at runtime if the current user has administrative rights?
Comment