You can also do

temp:string;


        setlength(temp,100);  //has to be big enough first
        
setlength(temp,getEnvironmentVariable(PChar('USERNAME'),PChar(temp),length(temp)));

since the user name is also an environment variable at least since Windows 
2000.

John

_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe

Reply via email to