Question

Locked

How to automatically minimize a command window upon invocation

By kvernon ·
Hi! Was hoping someone here could help me with a problem I've been chasing. I need my users to be able to enter 'ssh://hostname' into the address bar of their browser and have that launch a putty session to 'hostname'. To that end, I registered the protocol by adding some keys to the registry. For more info on how to do this, see http://kb.mozillazine.org/Register_protocol.
This allows me to specify in the registry what should happen whenever someone types 'ssh://hostname' in the address bar. Unfortunately, I was unable to simply have it launch putty.exe because when I did that, putty tried to connect to the host ssh. What I needed was a script to act as intermediary and remove the 'ssh://' and simply pass 'hostname' to putty. I wrote a simple bash shell script to do just that, installed cygwin utilities which allow me to run a bash shell (unix environment) such that now I can type 'ssh://hostname' into the browser address bar, which then launches bash.exe in a black "DOS Window" and then my putty session to 'hostname'. Wonderful! Except one thing. I don't want the black DOS window to show at all, or if it does, it should be minimized so that my users don't get confused. I know that in win9x there was a simple option within the properties of any "DOS" application that, if checked, would run the application minimized, however, that seems to have been removed in w2k. Does anyone know how I can fix this? Thanks!

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

One of these two may help

by IC-IT In reply to How to automatically mini ...

First a DOS troubleshooter for the window staying open.

http://www.allenware.com/mcsw/bus.htm#WindowClose

Second a bit of code that can be added to do the job.

http://www.pcreview.co.uk/forums/thread-2037434.php

Collapse -

Didn't help

by kvernon In reply to One of these two may help

Thanks, but neither will be of much assistance because its not a bat file that I am starting. Technically, the program that I am launching via the registry is bash.exe with my script (puttyscript.sh) as a startup option. I tried adding start /min to the registry call but to no avail. Oh well. I may just have to deal with user complaints. Thanks!

Collapse -

In the registry

by IC-IT In reply to Didn't help

Is it being opened something like this;

cmd.exe programname.exe

If so try adding a /C after cmd.exe

cmd.exe /C programname

If the program finishes itself after being called, this should exit the cmd window.

Back to Windows Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums