During my innosetup application installation, I am registering a dll (which is used for windows right click context menu and icon overlays, something similar to dropbox/tortoise cvs) and performing some other stuffs also. Till now, I am insalling the application only for the administrator user. The dll will write the information in HKCR, HKLM. Now, I plan to support installation for other non-admin users too (standard user).
I tried several things like below,
- changed the privilegerequired from Admin to none.
- changed all registry updates from HKLM to HKCU.
But, if I try to install the application, the dll registration failed due to unable to write on HKCR. So, I planned to register dll only for the admin user. And for other normal users, plan to skip the dll registration and do the other stuff. But I can’t find out, how to identify the current users is a admin user. Can any one let me know the following things,
- can we identify whether the current login user is a admin/power user or not?
- can we register dll (writing HKCR) with out admin rights?
Thanks for your reply.
You can check whether the current user is admin or power user: