Archive: How to get current username?


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.


You can use the UserMgr plugin for example:
http://nsis.sourceforge.net/UserMgr_plug-in


Or using the system plugin, which is installed with NSIS by default:
http://forums.winamp.com/showpost.ph...73&postcount=3


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!


http://forums.winamp.com/showpost.ph...27&postcount=4

Stu