Command line without DOS box

This is a place for users to discuss Altap Salamander. Please feel free to ask, answer questions, and express your opinion. Please do not post problems, bug reports or feature requests here.
thomas
Translator
Translator
Posts: 108
Joined: 29 Apr 2007, 21:57
Location: Germany

Command line without DOS box

Post by thomas »

How can I execute an exe file in command line without this DOS box?
execution of exe file in DOS-box
execution of exe file in DOS-box
cmd.png (11 KiB) Viewed 11105 times
I believe with salamander it must be possible.
therube
Posts: 674
Joined: 14 Dec 2006, 06:22

Re: Command line without DOS box

Post by therube »

I assume you're clicking on an .exe in Salamander, & not opening a command prompt & running the .exe from there?
If so, thinking the box you're seeing is from the .exe itself & not Salamander.
If you run the .exe from Windows Explorer, do you see the same?

No, that is not what you're doing.
You're entering a command onto the "Command Line".


Looks like Salamander is running a command like:

Code: Select all

E:\Windows\system32\cmd.exe /K "i_view32.exe "
From a straight DOS prompt, I'll often use a batch file that does nothing more then calls the actual program I'm wanting to run such that I am not left with an unwanted prompt window.

How to accomplish the same from Salamanders Command Line ...?
WinXP Pro SP3 or Win7 x86 | SS 2.54
thomas
Translator
Translator
Posts: 108
Joined: 29 Apr 2007, 21:57
Location: Germany

Re: Command line without DOS box

Post by thomas »

I'm using the possibility to start an exe file about the command line on the bottom of the salamander.
The DOS box belongs to salamander. You're right it's simular to you your example. Other file managers e.g. the TC (Total Commander) doesn't open the DOS box in my example. Sorry, the extracting windows belongs to the setup.exe.
cmdline.png
cmdline.png (26.12 KiB) Viewed 11086 times
User avatar
mdruiter
Posts: 262
Joined: 22 Feb 2006, 15:33
Location: Amsterdam, The Netherlands
Contact:

Re: Command line without DOS box

Post by mdruiter »

Code: Select all

start /b setup.exe /exelang 1033
This will close the DOS box as soon as the exe starts.
User avatar
SvA
Posts: 483
Joined: 29 Mar 2006, 02:41
Location: DE

Re: Command line without DOS box

Post by SvA »

mdruiter wrote:

Code: Select all

start /b setup.exe /exelang 1033
This will close the DOS box as soon as the exe starts.
Well this really depends on the state of the "Close shell window after command execution (in Command line)" option on the General tab. (Alt+Enter toggles the behaviour)

But fundamentally, the Altap Salamander commandline is executed through the console. (Windows Run dialog, on the other hand, does not do so. It appears to use shellexecute.) Commands built into cmd.exe, such as dir, can be executed from AS's commandline but cannot be executed from Windows' Run dialog directly. On the reverse, some applications are not found by the command processor (cmd.exe by default) even though they can be executed through Win's Run without any hassel (e.g. those that are listed in "App Paths" in the registry but not in the PATH environment variable). And furthermore, AS's commandline cannot directly launch documents. For both these cases you need to run these using the start command. And there is the disadvantage of getting the console window of the command processor which either stays for good or until the initial command terminates (That's the trick with the start command. It launches the command you wanted to execute, then by default terminates imediately.)

Since it is so easy to get a consol window if you need one, I'd vote for a commandline that mimics Windows's Run and not a command processor prompt (more so since that will be replaced by powershell anyway soon)
thomas
Translator
Translator
Posts: 108
Joined: 29 Apr 2007, 21:57
Location: Germany

Re: Command line without DOS box

Post by thomas »

The option "Close shell window after command execution (in Command line)" in the configuration menu has the same result like the "start /b" command. The problem is not to close the shell window.

I miss the option: "Hide shell window (DOS box) by execution in Command line".
I will not see this black window when I start a program from the command line like the "Run..." function from Windows XP.
User avatar
mdruiter
Posts: 262
Joined: 22 Feb 2006, 15:33
Location: Amsterdam, The Netherlands
Contact:

Re: Command line without DOS box

Post by mdruiter »

The option and start /b have very different effects.
If the option is disabled, a shell window (CMD.EXE) will be added every time you use the command line. This window can be used to type other commands. I think this is useless, so I have the option enabled.
Leaving out start /b before the command line causes the shell window to wait for the program to end. The window is black, and useless in the case of Windows gui programs.

As SvA mentioned, the Salamander command line is executed differently compared to Windows Run. Because of this you will always get a black screen, although it's only for a fraction of a second if using start /b.
Post Reply