how to use TumbleWeed secure transport via command line only - windows

We have been told that we have to use a piece of software called TumbleWeed Secure Transport to transport files between our selves and the other company. I can get it to work with the GUI but not with the command line.
Part of the issues I am having is the GUI will open even when using the command line:
C:\Progra~1\Tumbleweed\STClient\STclient.exe httpsu://user:pass#hostname.com:443/inbox/ C:\temp\File /prefNoAskSched /prefASC
The GUI will not disappear at all and the batfile does not return till the GUI is manually closed.
We do not want to use the GUI as the users have a bad habit of braking things if we let them touch it so automation seems far safer.
Has anyone had any experience with this app?

I managed to get it to work with the following command line:
C:\Progra~1\Tumbleweed\STClient\STclient.exe httpsu://user:password6#hostaddress.com:443 /inbox/ C:\temp\ACEJON /Remote-Site SITENAME /prefNoAskSched /prefASC /hidden /log /quitWhenDone

Related

How can a native macOS app programmatically run a shortcut from Apple's Shortcuts app?

Given the name of a shortcut in Apple's Shortcuts app, or some other way of identifying a shortcut, how can a native macOS app run it?
This would be the equivalent of executing the following shell command:
shortcuts run "Shortcut name here"
Granted executing a shell command is a possible way of doing this, but I'm hoping that using an API function will be better since they generally allow for better control and error handling. For example, the shell command doesn't provide any easily obtained error code for the calling process when something goes wrong, but rather displays a system notification with the error code.
edit: So far searching online and Apple's docs, as well as looking at the external symbols in Apple's shortcuts command line utility, suggests there is currently no public API for this. If so then then executing a shell command is probably the only way to do this. I'll leave this question open in case this is incorrect or it eventually changes.

Osx - users and GUI

My question is very simple.
How does OSX understands that this special process needs to make output to special terminal? Can we change it?
For example, is it possible to run process via ssh connection (without GUI) and make some system call, and this process will start using OSx GUI
I don't really understand your question, but I suspect you maybe have a look at the "expect" tool, which allows you to start some connection and then let the user continue after you have established the connection. Try:
man expect
in a terminal window.

Disable Terminal for Command Line Tool

I programm an artificial life simulation on my mac with Xcode in C++/OpenGL.
Due to the fact that my programm has a visual output in a seperated window,
I do not need the terminal, while running the concrete programm.
Nevertheless the terminal opens when I run my application throwing '/path/programm ; exit;' at its user. I guess that is for debuging? Or maybe standard because it is a command line tool?
So if I want to make a proper looking application out of it, which does not bother its users with command line outputs, what do I have to do?
If it is inherent of the command line tool to open the terminal do I have to migrate the source code to a cocoa app or Qt even though I yet do not need these build interfaces?
Thank you for your effort.
If I understood your question right, you don't want the terminal to be shown when the user double-click your app ?
In this case you should create a .app bundle and embed your binary into it.
I just tested with the basic "Hello world" Xcode command line template, it works fine.
You can use
#echo off
In the part off your code that requires the terminal.

Is it possible to start console process from ruby GUI script (.rbw)

I have a GUI Ruby tool that needs to spawn a child command-line process, for example ping. If i do this on Windows, the console window will appear and dissapear for console process, that is very annoying. Is it possible to start a process from GUI Ruby script with no console window visible? If i use backtick operator or Kernel#system, the console window will appear, see example below:
require 'Tk'
require 'thread'
Thread.new { `ping 8.8.8.8` }
TkRoot.new.mainloop
The issue is that every executable on Windows is defined to be either a GUI executable or a Console executable (well, there's more detail than that but it doesn't matter here) at the time it is built. The executable that's running your Ruby script is a GUI executable (it also happens to use Tk to actually build a GUI, even if only a very simple one in your screenshot) and the ping executable is a Console executable. If a GUI executable starts a Console executable, a console is automatically created to run the executable in; you can't change this.
Of course, the picture is more complex than that. That's because a console application can actually work with the GUI (it just needs to do the right API calls) and you can use a whole catalogue of tricks to cause the console window to stay out of the way (such as starting ping through an appropriately-configured shortcut file) but such things are rather awkward. The easiest way is to have the console window be there the whole time by making Ruby itself be a console app (through naming your script with the .rb suffix, not .rbw). Yes, it doesn't really get rid of the problem, but it stops any annoying flashing.
If you were using ping as the purpose of your app (i.e., to find out if services were up) then I'd as whether it is possible/advisable to switch to writing the checking code directly in Ruby by connecting to the service instead of pinging it, as ping just measures whether the target OS kernel is alive, and not the service executable. This is a fine distinction, but I've seen machines get into a state where no executables were running but the machine was still responding to pings; this was very strange and can totally break your mental abstractions but can happen. But since you're only using ping as an example, I think you can just focus on the (rather problematic) console handling. Still, if you can do it without running a subprocess then definitely choose that method (on Windows; if you were on any sort of Unix you wouldn't have this problem at all).
It is indeed possible to spawn processes with Ruby. Here is a couple of ways to do it. I am not sure what you mean with
the console window will appear and dissapear for console process
but I think the best way for you to do it is to simply grab out and err and show it to your user in your own window. If you want the native windows console to appear wou probably need to something fancy with windows scripting.
One way to keep a spawned console alive is to have it run a batch file with a PAUSE command at the end:
rungping.bat:
ping %1
pause
exit
In your ruby file:
Thread.new {`start runping.bat 8.8.8.8`}

Best way to make a script to SSH?

My university has quite a lot files (like past papers etc) which I need to be on the uni network to access them. I ssh, using port forwarding, into the network and set my browser (Firefox) to go through that port. I know it would be quite easy to write something in most languages that would enter the command into a terminal, but which language/method could I use to make this happen? I expect some sort of scripting language could but I really know nothing about them, but I'd be willing to learn one just to have a little fun with this.
I'm using a cygwin terminal on Windows 7, if that will make a difference.
To neaten up my question: Which language would be best to acheive the above effect? Not necessarily the best, just possible and relatively simple to learn. I used the word best so I suppose I'll put a subjective tag.
EDIT:
Just in case anyway wants to do this precise thing, I'll show my solution. I ended up using a batch file because a few things made the bash more difficult. Anyway, in order to SSH into the network and open a new firefox window with the proxy changed, I just have to open this batch file and enter my password.
cd C:/cygwin/bin
ssh -fND 9001 username#your.website.here
cd "C:/Program Files/Mozilla Firefox"
firefox -no-remote -P SSH_profile
Save as .bat
In order for this to work you need to set up a profile with name SSH_profile (or whatever) and set the connection settings to go through port 9001. The script will open use the ssh command in /cygwin/bin and enter in the information. You enter your password and then it goes to your firefox directory, uses those arguments which opens a separate profile with the connection settings changed (means you can view unaccessible files in one window and anything else you don't want to be on your uni network in another. Just close the windows when you are done.
Quite a specific case but I thought I'd share my answer in the hope of helping someone, some day.
Since you are using cygwin, write a bash shell script.. If you don't want to rely on bash, powershell would be what you want, although you could probably get it working using a batch file.
This is exactly the kind of thing shell scripting is for.
Edit
You can change the firefox settings on the command line by passing the -override flag. This will let you have special settings for the invoked process.

Resources