I have a web application that contains a command to start an EXE
Process.Start("MyApp.exe")
This app will then run putty.exe
and will SendKeys
to emulate keystrokes to the application.
The app works fine if I start under my username, or even if I run using runas /user:anyother_user
.
The problem is, when MyApp.exe
starts putty.exe
(which is what should happen when someone opens a certain web page), I can see that the app is started, and a process is created for both MyApp.EXE
and putty.exe
. However, nothing seems to be visible to me or any user. Mainly because the application is started under NT AUTHORITY\NETWORK SERVICE
.
I can tell that none of the keystrokes that MyApp
is sending, are reaching putty.
I suspect that it is due to putty
launching a dialog box for the first time it runs under a user (prompting to establish secure connection, etc..).
My questions are:
- Can I somehow tell putty to avoid these dialog boxes?
- Can I tell
ntauthority\networkservice
to dismiss the dialogbox raised by putty? - Can I view the
putty
window launched bynetwork service
? so that I may dismiss it myself and then it will no longer appear again? - Can I run
putty
as any other user (without having to store any passwords, for security reasons)?
Any answer to these questions will help me achieve my goal.