![]() |
#1 |
Junior Member
Join Date: Jan 2016
Posts: 8
|
![]()
Please help me to get current login user from NSIS script during installation
Thanks in advance! Last edited by usmaan.saeed; 25th January 2016 at 06:48. |
![]() |
![]() |
![]() |
#2 |
Junior Member
Join Date: Jan 2016
Posts: 8
|
![]()
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. |
![]() |
![]() |
![]() |
#3 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,453
|
It is a bit unclear to me what you are asking for. Do you want the username or the path to their profile?
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#4 |
Junior Member
Join Date: Jan 2016
Posts: 8
|
@Anders,
I need to get path to their profile. |
![]() |
![]() |
![]() |
#5 |
Senior Member
Join Date: Nov 2012
Posts: 166
|
???
PHP Code:
|
![]() |
![]() |
![]() |
#6 |
Junior Member
Join Date: Jan 2016
Posts: 8
|
@stass
Thanks buddy! |
![]() |
![]() |
![]() |
#7 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,453
|
Just remember that you are not really supposed to put things in $PROFILE. Use one of the appdata constants...
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#8 |
Member
Join Date: Jul 2015
Posts: 66
|
How about using the UserMgr plugin.
http://nsis.sourceforge.net/UserMgr_plug-in 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) |
![]() |
![]() |
![]() |
|
Tags |
#help |
Thread Tools | Search this Thread |
Display Modes | |
|
|