Page 1 of 1

EXE SYS -w Powershell (Opens a DOS Window)

Posted: Fri Dec 03, 2010 4:20 am
by GomezL
EXE "SYS -w Powershell"

The above command will launch a windows application. The problem i ran into was the windows application with actually a "console application".

Cosmetically, the console application looks a lot like "A DOS WINDOW", but internally, if you look at task manager, cmd.exe (DOS) is not a process, only Powershell

Looking at the syntax "-m and -M" seem to be for "DOS Only", but Just for fun I tried the following:

sys -w -m Powershell

This caused the "Powershell" to be minimized.

and then

sys -w -M Powershell

This caused the "Powershell" to have no taskbar icon as well as running "Invisibly".

In short, -m & -M are NOT DOS only commands.

The simple solution, sys -w -m or sys -w -M.

Re: EXE SYS -w Powershell (Opens a DOS Window)

Posted: Fri Dec 03, 2010 8:47 am
by bluesfannoz
Thanks Luis. Actually I had tested this after the meeting and determined I only needed the 'sys -M'. With the 'sys -w -M' my script errors out in Powershell, where with just the 'sys -M' it executes without any window or taskbar. Which was the functionality I wanted.

GomezL wrote:EXE "SYS -w Powershell"

The above command will launch a windows application. The problem i ran into was the windows application with actually a "console application".

Cosmetically, the console application looks a lot like "A DOS WINDOW", but internally, if you look at task manager, cmd.exe (DOS) is not a process, only Powershell

Looking at the syntax "-m and -M" seem to be for "DOS Only", but Just for fun I tried the following:

sys -w -m Powershell

This caused the "Powershell" to be minimized.

and then

sys -w -M Powershell

This caused the "Powershell" to have no taskbar icon as well as running "Invisibly".

In short, -m & -M are NOT DOS only commands.

The simple solution, sys -w -m or sys -w -M.

Posted: Fri Dec 03, 2010 11:40 am
by GomezL
That makes sense as PowerShell probably uses CMD.exe (DOS) for some of it's functionality.

I really made this post to "Share With the Community" because I found it really interesting that -w -M runs a windows program "Invisibly".