Click here to Skip to main content
15,887,337 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Can we run an executable file of the client computer from an application hosted in Citrix?

I already tried too many options like PsExec, Process.Start() with Username-Password, etc. But I could not able to find the solution.

In every solution I got Error - "Access is Denied" or "Username or Password is Incorrect".

What I have tried:

ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "notepad.exe";
startInfo.Domain = "XXX";
startInfo.Password = new NetworkCredential("","myPCPassword").SecurePassword;
startInfo.UserName = "myusername";
startInfo.UseShellExecute = false;
Process start = Process.Start(startInfo);

and
psexec \\10.235.163.85 -u sesa530417 -p -i -s -h "notepad.exe"
Posted
Updated 16-Aug-19 2:14am

No, you can't. The app running in the Citrix environment has no idea there's a "client" computer connected to it at all.

They only way you'd be able to determine this, and get the hostname/ip address for it, is if your Citrix-side code interacts with the Citrix server to get that information. It may be possible to do, but I have no idea how to do it as I've never had a reason to do so. You're going to have to Google for this.

Now, there's another problem. To launch a process on another machine, the Citrix-side code needs to know an admin username and password for the client machine. If the Citrix server and the clients are in the same Active Directory domain, this would consistent across all machines involved.

If they are NOT in the same domain, or not in a domain at all, your code would have to know the name of an admin account and the password for every machine it's going to try to launch a process on. This will most likely NOT be the same for every machine.

...and another problem. You can NOT launch a user-interactive process remotely. This is prevented by Windows for security reasons. The process may launch, but the user(s) logged in on the machine will never see it.

I think you're going to have to rethink what you're doing, how you're doing it, and WHY you're doing it.
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900