Use SendKeys to Execute the Opening Command on the Putty window after logged in + NEWLINE. Tested and working.

This commit is contained in:
Todd Hubers
2021-11-13 03:05:02 +11:00
parent b6d2c72a40
commit 3b05eba2e2

View File

@@ -203,6 +203,10 @@ namespace mRemoteNG.Connection.Protocol
string.Format(Language.PanelHandle,
InterfaceControl.Parent.Handle), true);
NativeMethods.SetForegroundWindow(PuttyHandle);
var finalCommand = InterfaceControl.Info.OpeningCommand.TrimEnd() + "\n";
SendKeys.SendWait(finalCommand);
Resize(this, new EventArgs());
base.Connect();
return true;