Thanks for all the help so far, but… I tried Robert’s suggestion below, which works brilliantly, returning my NT user name as an MPE variable. But as he suggests, I have not been able to find a way to run this from a command file or a program – I don’t want to have to put the macro permanently onto over 200users machines, and would prefer to maintain it only on the HP. Tom suggested a way to do this from a command file (also below), but whichever way I try it, I haven’t been able to get his command file to work (yet). If anyone knows how I can run Robert’s suggestion below, without having to set it up as a macro, I would be delighted to hear from them. Many thanks in advance, Andrew. -----Original Message----- From: Tom Emerson [mailto:[log in to unmask]] Sent: 27 September 2001 18:56 To: [log in to unmask] Subject: Re: [HP3000-L] Capturing Network Logon Name with Reflection... * Please Note : This message was received from the Internet * _____________________________________________________________ On Thu, 27 Sep 2001 17:38:28 +0100, Robert Mills <robert.mills@WINDSONG- SERVICES.CO.UK> wrote: >The following Reflection Basic code will create a variable on the HP3000. >Can't get it to work if stored and run from the host (yet). As they say >'Watch This Space'. > >Sub Main > With Application > .Transmit "setvar NetworkUserName '" & .PCUserName & "'" & Chr$(rcCR) > End With > End Sub > using that as a jumping off point, I found the following works at the command prompt: setvar esc chr(27) echo !esc&oG echo sub main echo application.transmit "pcusername" & chr$(rcCR) echo end sub echo !esc&oH input uname echo You logged onto your PC as !uname (this is kept as the file "pcuname") :pcuname pcusername You logged onto your PC as pcusername : Note I've quoted "pcusername", thus making it a literal string -- I tried application.username, however my copy of reflection (5.2) does not think that "pcusername" is a component of the "application" class -- YMMV BUT, this excersise DID point out a cool thing or two, namely, the esc&oG / esc&oH strings allow MULTIPLE messages to be passed to the PC, eventually executing as an entire RBS subroutine. (I guess I'm to "old school" -- I'm used to the concept of the entire "command" needing to be passed as a single string from the HP to the PC...) -----Original Message----- From: Andrew Russel [mailto:[log in to unmask]] Sent: 27 September 2001 16:29 To: [log in to unmask] Subject: Capturing Network Logon Name with Reflection... I'm not sure if this is possible??? I have an application running on the HP3000. A user logs onto this application, through Reflection as... HELLO USER.ACCOUNT The USERname they specify is different from their NT logon user name. Within the program I would like to programmatically capture their Network logon name. Is this possible? I do not want to add/delete any users to accomplish this. Thanks in advance. Andrew ____________________________________________________________ Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie * To join/leave the list, search archives, change list settings, * * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *