Skip to content
⌘ NSIS Forum Archive

User Info during Installation process

8 posts

usmaan.saeed#edited

User Info during Installation process

Please help me to get current login user from NSIS script during installation

Thanks in advance!
usmaan.saeed#
User Info during Installation process

Please provide the suggestions to get user info during installation process so that i can retrieve some files into the user folder using installer

Thanks in advance.
Anders#
It is a bit unclear to me what you are asking for. Do you want the username or the path to their profile?
stass#
???
SetShellVarContext current
MessageBox MB_OK|MB_ICONINFORMATION "$PROFILE"
MessageBox MB_OK|MB_ICONINFORMATION "$APPDATA"
MessageBox MB_OK|MB_ICONINFORMATION "$LOCALAPPDATA" 
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.
Anders#
Just remember that you are not really supposed to put things in $PROFILE. Use one of the appdata constants...
pkonduru#
How about using the UserMgr plugin.



I pasted an excerpt from that page. Wouldn't the HOMEDIR return what you want?

UserMgr::GetUserInfo "USERID" "FIELD"
returns a specific information for the given user-ID
where "FIELD" can be one of the following:
EXISTS
returns "OK", if the user exists on the system, otherwise an error is returned (string "ERROR xxxx")
NAME
returns the user name
FULLNAME
returns the full user name (e.g. firstname surname)
HOMEDIR
returns the path to the users home directory
COMMENT
returns a comment stored for the user
PASSWD_STATUS
returns the Password status for the user (either NEVEREXPIRES or CANTCHANGE)