Last post May 14, 2009 11:08 AM by johnstde
May 08, 2009 12:58 PM|johnstde|LINK
i = Shell(
The command procedure calls a Java program that opens a dialog box, the cmd and java exe shows up in task manager, so I know it is being called, but no dialog box. I know normally having anything show up on a server that
requires user interaction is a bad idea, but in the case, the users remote into the server to do their work. (They have to because of the environment) So, there is no problem with them being able to respond to a dialog box. I just need it to show up.
Any suggestions or ideas, much appreciated. (I cannot rewrite the Java program as the latest source is not the right version)
Running, Framework 2.0, 3.5.
May 10, 2009 05:57 PM|BlueJam|LINK
Might be worth checking what user the exe is running under, if it's not the one that's logged into the desktop then that might cause problems.
What's the application that's running the above Shell command, is it a ASP.NET, winform, console or windows service application.
May 11, 2009 11:13 AM|johnstde|LINK
Thank you for your response and interest in the problem.
I have run the app under the asp.net user account and Windows account (changed in IIS security). I presume this changes the account the app runs under, I will test this theory in a few. If there is more to this than I am seeing, please let me know.
The app is a Java Program.
I was worried at first that I was unable to create the <servername>/asp.net account due to the size of the servername. But despite that, the program does run.
May 11, 2009 03:28 PM|BlueJam|LINK
It should tell you in task manager the user that the exe is running under.
The following might be helpful also :-
May 12, 2009 01:25 PM|johnstde|LINK
I ran the program using the user name attached to the asp.net process and also with only Windows Authentication (in IIS security) and task manager simply reports the app as running under "Network Services". Which relates exactly to the article you sent.
I am checking that out now, looks like you put me on the right track. Thanks! I will be back after more testing.
May 13, 2009 05:21 PM|johnstde|LINK
I tried using the above code, with my username and password, as I am an admin on the server, but no luck so far. I'm on the right track, thanks to your suggestions, just haven't found the combination yet.
May 14, 2009 03:39 AM|BlueJam|LINK
I think for it too work application would need to impersonate the user that's currently logged into the servers desktop.
I think your java exe would then run under the context of that user and pop up on the desktop.
May 14, 2009 11:08 AM|johnstde|LINK
That is what I thought too, but it didn't work when I tried it....
There is probably a way to get around it, but It would not be a good permanent solution even it it had worked as I wouldn't want my username and password in Web.config, plus there are other people who will run this,,,
Haven't had much time to fool with it lately, but will get back to it eventually and figure it out.