You have to login in order to post a reply to this topic.

3 replies [Last post]
Turnere
Turnere's picture
User offline. Last seen 1 year 37 weeks ago. Offline
Joined: 05/24/2010
Posts: 2

I have created a script which allows certain users to send us (Support Team) some information from two dedicated pc's. The script works ok but i am wondering if and how the persons user name that they logg on with to the pc can be added to the txt file they send us as either in the title of the txt or embedded in the first line of txt?

__________________

Eddie

__________________

Eddie

D.M.Altizer
User offline. Last seen 1 year 11 weeks ago. Offline
Joined: 01/12/2010
Posts: 204
Re: Adding users name to txt file?

 Have you tried using the "Run DOS Command" action? You should write:

echo \%USERNAME\%

in the "Dos Command or Application" field, and the username of the currently logged in user will be saved in the first output variable (default: %CommandOutput%). You can of course change the name of this variable to something more fitting (e.g. %Username%). Then you can use this variable to write the logged in user's name in a log file.

__________________

==Dedicated Automation Solutions==

__________________

==Dedicated Automation Solutions==

Turnere
Turnere's picture
User offline. Last seen 1 year 37 weeks ago. Offline
Joined: 05/24/2010
Posts: 2
Re: Adding users name to txt file?

Dm thanks very much for that i have applied what you said and it works.

__________________

Eddie

__________________

Eddie

D.M.Altizer
User offline. Last seen 1 year 11 weeks ago. Offline
Joined: 01/12/2010
Posts: 204
Re: Adding users name to txt file?

 No problem mate :) Enjoy!

__________________

==Dedicated Automation Solutions==

__________________

==Dedicated Automation Solutions==