Skip to content
⌘ NSIS Forum Archive

Simplest way to add subdirectories to Users\Username?

4 posts

ivaldes1#

Simplest way to add subdirectories to Users\Username?

I need to add the path .CPRS\Cache\Temp.html or just .CPRS\Cache to the Users\Username subdirectory. What is the simplest way of doing this? Also for Windows 7-10 will this require administrator auth? Many thanks! Getting close.
Anders#
Are you talking about the same user as the user that is running the installer or a specific hardcoded username? You don't need to elevate to write to your own profile.

Take a look at the constants section in the help file.

On a personal note, I hate it when applications adds folders to my profile root. Your path contains the names "Cache" and "Temp" so you really should put it under $LocalAppData!
ivaldes1#
User running the installer. So you SetOutPath "$LocalAppData" then create .CPRS\Cache but I'm not sure from the wiki what is the actual command to create subdirectories like .CPRS\Cache?