Please help me to get current login user from NSIS script during installation
Thanks in advance!
User Info during Installation process
8 posts
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.
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.
It is a bit unclear to me what you are asking for. Do you want the username or the path to their profile?
@Anders,
I need to get path to their profile.
I need to get path to their profile.
???
SetShellVarContext current
MessageBox MB_OK|MB_ICONINFORMATION "$PROFILE"
MessageBox MB_OK|MB_ICONINFORMATION "$APPDATA"
MessageBox MB_OK|MB_ICONINFORMATION "$LOCALAPPDATA" @stass
Thanks buddy!
Thanks buddy!
Just remember that you are not really supposed to put things in $PROFILE. Use one of the appdata constants...
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)
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)