MZXPTLK Posted September 28, 2009 Share Posted September 28, 2009 Hi together, i am writing a VB.Net program that establishes SSH-Connections using Putty.exe. I use AutoItX component. I have a problem sending "echo $SHELL", using ControlSend in the following Code: iReturn = oAutoIt.ControlSend("[Handle:" & sHandle & "]", "", "", "echo $SHELL", 1) ControlSend cannot interprete the '$' because it thinks it is a variable. so the Putty-Window gets the string "echo 4SHELL" instead of "echo $SHELL". What is the right syntax, thanks. Link to comment Share on other sites More sharing options...
99ojo Posted September 28, 2009 Share Posted September 28, 2009 (edited) Hi together, i am writing a VB.Net program that establishes SSH-Connections using Putty.exe. I use AutoItX component. I have a problem sending "echo $SHELL", using ControlSend in the following Code: iReturn = oAutoIt.ControlSend("[Handle:" & sHandle & "]", "", "", "echo $SHELL", 1) ControlSend cannot interprete the '$' because it thinks it is a variable. so the Putty-Window gets the string "echo 4SHELL" instead of "echo $SHELL". What is the right syntax, thanks. Hi, try $sendstring = "echo " & "$" & "Shell" iReturn = oAutoIt.ControlSend("[Handle:" & sHandle & "]", "", "", $sendstring, 1) or iReturn = oAutoIt.ControlSend("[Handle:" & sHandle & "]", "", "", "echo " & "$" & "SHELL", 1) ;-)) Stefan Edited September 28, 2009 by 99ojo Link to comment Share on other sites More sharing options...
TurionAltec Posted September 28, 2009 Share Posted September 28, 2009 try "{ASC 036}" instead of $ iReturn = oAutoIt.ControlSend("[Handle:" & sHandle & "]", "", "", "echo {ASC 036}SHELL", 1) Link to comment Share on other sites More sharing options...
MZXPTLK Posted September 28, 2009 Author Share Posted September 28, 2009 thanx together, both of them do not work as expected. I think this is a problem of putty, will check again tomorrow ... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now