Skip to content
⌘ NSIS Forum Archive

user profile folder (not the installer)

4 posts

kalverson#

user profile folder (not the installer)

Just checking if someone has something here to make life easier. I have an install that creates a user profile for running a postgresql database. On the uninstall, I delete the user, but the profile folder is currently left behind. Is there anything available that will return just the profile folder path without the user attached so I can create and add a remove on the uninstall for the user folder?
Animaether#
you mean a Windows user profile?
If so.. I'm not 100% sure if this always applies ..wouldn't the parent folder of the current profile be applicable?

!include "filefunc.nsh"
OutFile "$%temp%\temp.exe"
ShowInstDetails show
Section
    ${GetParent} "$PROFILE" $0
    DetailPrint "Profiles folder: $0\"
SectionEnd 
kalverson#
Originally Posted by Animaether View Post
you mean a Windows user profile?
If so.. I'm not 100% sure if this always applies ..wouldn't the parent folder of the current profile be applicable?

!include "filefunc.nsh"
OutFile "$%temp%\temp.exe"
ShowInstDetails show
Section
    ${GetParent} "$PROFILE" $0
    DetailPrint "Profiles folder: $0\"
SectionEnd 

Thanks, that worked perfectly. The GetParent saved me the hassel of writting that part myself.
Animaether#
yeah, there's tons of goodies in the headers that ship with NSIS - I recommed reading through the docs in some idle time.. even if nothing in there helps you immediately, it can save you in the future (remembering that a function that might help you is in those headers). Ditto the wiki, but start with the docs as several wiki pages are deprecated in favor of the headers that ship with NSIS 🙂