Old 25th January 2016, 05:32   #1
usmaan.saeed
Junior Member
 
Join Date: Jan 2016
Posts: 8
Smile User Info during Installation process

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 07:48.
usmaan.saeed is offline   Reply With Quote
Old 25th January 2016, 10:56   #2
usmaan.saeed
Junior Member
 
Join Date: Jan 2016
Posts: 8
Smile 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.
usmaan.saeed is offline   Reply With Quote
Old 25th January 2016, 17:32   #3
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,321
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
Anders is offline   Reply With Quote
Old 27th January 2016, 04:48   #4
usmaan.saeed
Junior Member
 
Join Date: Jan 2016
Posts: 8
@Anders,
I need to get path to their profile.
usmaan.saeed is offline   Reply With Quote
Old 27th January 2016, 12:27   #5
stass
Senior Member
 
Join Date: Nov 2012
Posts: 147
???
PHP Code:
SetShellVarContext current
MessageBox MB_OK
|MB_ICONINFORMATION "$PROFILE"
MessageBox MB_OK|MB_ICONINFORMATION "$APPDATA"
MessageBox MB_OK|MB_ICONINFORMATION "$LOCALAPPDATA
http://forums.winamp.com/showthread.php?t=289847
stass is offline   Reply With Quote
Old 29th January 2016, 04:59   #6
usmaan.saeed
Junior Member
 
Join Date: Jan 2016
Posts: 8
@stass

Thanks buddy!
usmaan.saeed is offline   Reply With Quote
Old 29th January 2016, 18:11   #7
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,321
Just remember that you are not really supposed to put things in $PROFILE. Use one of the appdata constants...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 4th February 2016, 20:11   #8
pkonduru
Member
 
Join Date: Jul 2015
Posts: 62
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)
pkonduru is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
#help

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump