Yes, it blows up, anything with su or sudo
You definitely cannot callsu
this way. You can only execute simple commands that quit after completing their task. That's not the case ofsu
. Asudo
may work, but there are lot of limitations, see:
https://winscp.net/eng/docs/faq_su
The update.sh script has several odd-timed sequence of commands that execute one after the other, and I can't call them individually because I don't know when they are going to end. So I put them in the update shell. If I use su or sudo in front of it, then, it blows up. I'm not good with Linux, and don't know how to retrieve output, I've tried, but don't know how to make the call. This is the logic behind the code.
OK, I figured it out. Took a chance it would work, and did the following:
Console.WriteLine(.ExecuteCommand("./update.sh").Output)
FYI: I was getting output all run-together, so I changed the code to this:
Str = (.ExecuteCommand("./update.sh").Output).Replace(Chr(10), Chr(13) & Chr(10))