Archive: USERPROFILE Question - Windows NT


USERPROFILE Question - Windows NT
Hello,


I've a doubt in NSIS Scripting.
In Windows NT, we've an Environment Variable known as USERPROFILE, which will have the current user name along with his/her homedirectory.
(Just do a SET USERPROFILE on a MS-DOS Command Prompt, The result
would be,
USERPROFILE=C:\WINNT40\Profiles\vkumara.)
Thru the .NSI Scirpting I need to delete a file which exists under
my homedirectory...
The username will not be consistent always..If I install my appliction with user Administrator,
then the USERPROFILE=C:\WINNT40\Profiles\Administrator.

How Can I goto this directory thru the script and delete the files.
Is there anyway I can achieve this?

Thanks in Advance for your help.

Regards
venky


USERPROFILE - Windows NT
Hello

I've posted a query regarding the subject mentioned.
I found out the answer myself...

The Answer is usage of ReadEnvStr Function fo NSIS Scripting.

For Ex,

ReadEnvStr "$4" "USERPROFILE"

Where in the above command USERPROFILE (User's homedirectory on
Windows NT ) would be read into $4 variable, then we can perform
whatever the activity we need on User's Homedirectory.

Regards
Venky