I would like my installer to put some files into a users home path, (the path that the Windows %USERPROFILE% environment variable points to, and the path Qt's QDir::homePath() returns).
I have looked at the Inno Setup Constants page, but can't find the path I am looking for.
Updates from @Andreas, suppose you have a file with contents and it needs to be set to users home directory
1)
C:\Users\sun\Desktop\.appcfg_nag
:2) InnoSetup you can do like below copy paste:
Now, the file .appcfg_nag will be located in
C:\Users\sun\.appcfg_nag
For user specific application data you should use the constant
{userappdata}
which points to the application data folder. In this location you can create a folder for your application to store user specific files in.I support the idea of being able to put files into the user profile directory. The files are not "documents" that would go into the {userdocuments} folder and they are not files to be hidden from the user that would go into {userappdata}. I don't see the logic behind the restriction that microsoft (and inno) seem to be imposing here.
Use environment variables
{%USERPROFILE}
or.{%HOMEPATH}
Update
As Martin pointed out in the comments,
{%HOMEPATH}
shouldn't be used because it has no disk name (e.g.,\Users\username
).