Archive: getuserName\getPathHome


getuserName\getPathHome
Hi,

Please can you help me,

How can I have the %userName% and %PathHome% for the user how use the icons , not hwo's install the kit ?

thx


No. If your installer is at admin level, there's no reliable way to get the path of a user. Best tactic is to install for all users, and in your application add some code that copies user-specific files to AppData (or wherever) the first time it's started.


An extremely(!!) unreliable method is using enumusersreg to read the path from registry. Will NOT work in far too many cases. For example on a new Windows installation. Don't use this method, unless you really don't care whether it will work or not.

More reliable method is to use the ShellExecAsUser plugin. Can still break in some cases.

Reliable but complex method is to use the UAC plugin. Not recommended for beginners.