Wai Wong
Wai Wong

Reputation: 2843

Get the path to My Documents with Inno Setup

Is it possible to retrieve the path to My Documents folder with Inno setup?

I tried to retrieve the path via registry

RegQueryStringValue(HKCU, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders', 'Personal', path);

But it returned: %USERPROFILE%\Mina dokument. When I tried to use it as install path it didn't work.

Upvotes: 1

Views: 5213

Answers (1)

splash
splash

Reputation: 13327

Inno Setup supports the Shell Folder Constants {userdocs} and {commondocs} for this job.

Upvotes: 7

Related Questions