Old 6th December 2010, 11:04   #1
Andrei_KC
Junior Member
 
Join Date: Dec 2010
Posts: 2
Thumbs up How to get current username?

Hi.

I'm very new to NSIS. In fact, I haven't done anything on it yet. I'm still reviewing installer authoring tools like NSIS to match the needs of what I'm going to make. As I've been reading the crucial things I need from NSIS in the documentation, specifically http://nsis.sourceforge.net/Docs/Chapter4.html#4.2.3 I didn't see any $USERNAME (somehow similar to %USERNAME% in cmd.exe). Is there a way to easily get the current user's name? I need that value for some other things I'll do within the installer.

Thanks in advance.
Andrei_KC is offline   Reply With Quote
Old 6th December 2010, 11:12   #2
jpderuiter
Major Dude
 
Join Date: Feb 2007
Posts: 672
You can use the UserMgr plugin for example:
http://nsis.sourceforge.net/UserMgr_plug-in
jpderuiter is offline   Reply With Quote
Old 6th December 2010, 11:18   #3
jpderuiter
Major Dude
 
Join Date: Feb 2007
Posts: 672
Or using the system plugin, which is installed with NSIS by default:
http://forums.winamp.com/showpost.ph...73&postcount=3
jpderuiter is offline   Reply With Quote
Old 6th December 2010, 11:23   #4
Andrei_KC
Junior Member
 
Join Date: Dec 2010
Posts: 2
jpderuiter,

Thank you for the fast response! Granted I haven't started on using NSIS yet, I see there are more than one solution to my question, which is a good sign! The second approach looks promising.

Though, I hope they think of adding that constant in future releases.

Thanks again!
Andrei_KC is offline   Reply With Quote
Old 6th December 2010, 11:55   #5
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
http://forums.winamp.com/showpost.ph...27&postcount=4

Stu
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
$username, current user, username

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