Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Hide MS-DOS box in Windows XP

Posted on 2004-08-18
4
Medium Priority
?
401 Views
Last Modified: 2008-02-01
During startup we are running a command line application.. the command looks something like

C:\app\runme.exe -d10 alpha d 40x

We need the DOS box to be hidden from the user... suggestions?  

The second part of the problem is that the task running needs to be set at LOW or BelowNormal priority so not to interfere with regulat operation (its normally highly CPU intensive)

(High point value due to urgency)

Thanks!
Jer

0
Comment
Question by:richarjb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 11

Accepted Solution

by:
jgiordano earned 1500 total points
ID: 11835157
Try the start command you can use low priority and run minimized:

Home NT Commands
      
      
      
NT Syntax

START

Start a specified program or command in a separate window.

syntax
      START "title" [/Dpath] [options] [command] [parameters]

key
   WHAT to run

   path       : Starting directory
   command    : The NT Command, Batch file or executable program to run
   parameters : The parameters passed to the command

   HOW to run it

   /MIN       : Minimized
   /MAX       : Maximized
   /WAIT      : Start application and wait for it to terminate
   /LOW       : Use IDLE priority class
   /NORMAL    : Use NORMAL priority class
   /HIGH      : Use HIGH priority class
   /REALTIME  : Use REALTIME priority class
   "title"    : Text for the CMD window title.
   /B         : Start application without creating a new window. In this case
                ^C will be ignored - leaving ^Break as the only way to
                interrupt the application
   /I         : Ignore any changes to the current environment.

   Options for 16-bit WINDOWS programs only

   /SEPARATE   Start in separate memory space (more robust)
   /SHARED     Start in shared memory space (default)

Bugs:
Although ["title"] is supposedly an optional parameter, when it is omitted other options may be interpreted as being the title - so to be absolutely sure just put something in like "My Script".

Documents
Document files may be invoked through their file association just by typing the name of the file as a command.
e.g. START WORD.DOC would launch the application associated with the .DOC file extension

Printers
A new printer can be installed very quickly (and the driver downloaded) with the command
START \\print_server\printer_name

Setting a Working Directory
To start an application and specify where files will be saved

START /Dc:\Documents\ /MAX notepad.exe

Note that START /D does not support long filenames which contain spaces, a workaround is to use the 8.3 compatible name(s)

Forcing a Sequence of Programs
If you require your users to run a sequence of 32 bit GUI programs to complete a task, create a batch file that uses the start command:

@echo off
start /wait /b <First.exe>
start /wait /b <Second.exe>
start /wait /b <Third.exe>

Create a shortcut to this batch file and place it on the Start menu or desktop. Set it to run minimized.
When the user double-clicks the shortcut, <First.exe> runs.
When <First.exe> terminates, <Second.exe> runs
When <Second.exe> terminates, <Third.exe> runs

An alternative method is to run a .BAT batch file under command.com (16 bit)

If Command Extensions are disabled, the START command will no longer recognise file Associations, and will not automatically evaluate the COMSPEC variable when starting a second CMD session.

Missing file extensions
When executing a command line whose first token does NOT contain an extension, then CMD.EXE uses the value of the PATHEXT environment variable to determine which extensions to look for and in what order. The default value for the PATHEXT variable is:

.COM;.EXE;.BAT;.CMD

Notice the syntax is the same as the PATH variable, with semicolons separating the different elements.

When executing a command, if there is no match on any extension, then NT will look to see if the name, without any extension, matches a directory name and if it does, the START command will launch Explorer on that path.

"Do not run; scorn running with thy heels" - Shakespear, The Merchant of Venice

Related commands:

CALL - Call one batch program from another
CMD - can be used to call a subsequent batch and ALWAYS return even if errors occur.
GOTO - jump to a label or GOTO :eof

Q162059 - Opening Office documents

Equivalent Linux BASH commands:

.period - Run commands from a file

[Back to the Top]

Simon Sheppard
SS64.com


0
 
LVL 9

Expert Comment

by:tosh9iii
ID: 11836408
0
 
LVL 15

Expert Comment

by:Cyber-Dude
ID: 11839624
Run commands as a service is a good idea.

You can do the following as well:
The process take 3 files. one 'launch.bat' one 'invis.vbs' and one <your program>
in 'launch.bat' put in...

====
wscript.exe "C:\yourpath\invis.vbs" "your file.bat"
====

in invis.vbs put...

====
CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False
====

And finaly in your file put whatever u want...

=======
echo off
erase c:\junk.txt
well your done just open up launch.bat
=======

I hope that helped...

Cyber
0
 
LVL 11

Expert Comment

by:jgiordano
ID: 12590480
This has been here a while have you tried any of the solutions?  Do you need further help?
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Occasionally Windows/Microsoft Updates will fail to update. We have found a code that will delete all temporary files and re-register all dll's related to Windows/Microsoft Updates! This works 99% of the time to get the updates working again! The…
I don't know if many of you have made the great mistake of using the Cisco Thin Client model with the management software VXC. If you have then you are probably more then familiar with the incredibly clunky interface, the numerous work arounds, and …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question