EXE SYS -w Powershell (Opens a DOS Window)

General development discussion.

Moderators: Susan Smith, admin, Gabriel

Post Reply
GomezL
Posts: 258
Joined: Wed Apr 29, 2009 5:51 am
Contact:

EXE SYS -w Powershell (Opens a DOS Window)

Post 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.
bluesfannoz
Posts: 291
Joined: Fri Jun 19, 2009 9:01 am
Location: Lawrence, Kansas
Contact:

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

Post 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.
Steve Koger
Computer Specialist
SEKESC-MACS Division
GomezL
Posts: 258
Joined: Wed Apr 29, 2009 5:51 am
Contact:

Post 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".
Post Reply