How to get citrix values in c#

I have a C# appliction that works fine on windows directly, but i have an issue when i run the application from citrix,

I need to write a file to the users c:\APP directory, on windows this is fine. But on citrx I need to find out the session , the user name which i think is the computer name and then write to the directory

i think it would be somthing like "\\\\client\\c$\\APP" and i would need to figure out what to replace the client part with, i am thinking the actual computer name.

LVL 2
Jayesh AcharyaTechnichal ConsultantAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Jacob78Connect With a Mentor Commented:
I believe you can use \\tsclient\C$\App\

0
 
Jacob78Commented:
So you want to write to the local client's C:\App folder?

If this is the case, I would recomend against it. The whole point of a Citrix app is to virtualize the app so it can run independant of the client. You also have to remember that end users control whether or not the Citrix sesssion has read and/or write access to the local client.
0
 
Jayesh AcharyaTechnichal ConsultantAuthor Commented:
you are right that I want to write back to the client, the deliverable i have been given is to right back to the client a xml file on their local machine, the application works fine from a thick client perspective but i have an issue of trying to locate the users machine to give him the file.

Any help would be greatly appreacieted ...
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
Jayesh AcharyaTechnichal ConsultantAuthor Commented:
is there a command i cna use in C# to get the citrix information of the client that is calling the application,
like its ip, username , the computername ...

0
 
Jacob78Commented:
You won't need to...\\tsclient\ is the path to the local client. See attached screen shot.
Capture.JPG
0
 
Jayesh AcharyaTechnichal ConsultantAuthor Commented:
yep i can hard code that value, but i dont like jard coding any of these sorts of values, wjhat for example if the local machine was on a non windows platform but i need to write a file to it, getting a holf o the client envirment variables would help me know who and from where are the users trying to acces the application. Some of this stuff is just to enable me to store the information in a log file if a inned to do some debugging of the application while its ina  aporduction enviroment ....
0
 
Jayesh AcharyaTechnichal ConsultantAuthor Commented:
it didnt get me all the vairables that are there on citrix but i did get to the local c drive
0
All Courses

From novice to tech pro — start learning today.