Solved

batch file question

Posted on 2010-09-22
10
511 Views
Last Modified: 2012-05-10
I created a batch file and it is executing the commands with no problem. but I do not want the black box to appear on the screen. I have added the @echo off in the beginning but the box with black box stays on untill the installation finishes.

I want this suppressed
Thanks Habib
0
Comment
Question by:Zak
  • 3
  • 2
  • 2
  • +3
10 Comments
 
LVL 65

Expert Comment

by:rockiroads
ID: 33740733
how are you issuing the call to run the batch script?

by blackbox I assume you mean the dos command window

you could create a shortcut to that batch script and tell it to run minimized

there is this console window tool (called Console Tool) which can be used hidden http://www.virtualizationadmin.com/files/consoletool.zip
0
 
LVL 4

Expert Comment

by:cmartell
ID: 33740754
Put the batch file somewhere else like C: maybe then put a shortcut to it on your desktop.  
Right click the shortcut and choose Properties
Go to the Shortcut tab
In the Run drop down choose Minimized
0
 

Author Comment

by:Zak
ID: 33740790
How do I use the console tool
I extracted it what do I do Now.
0
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 
LVL 11

Accepted Solution

by:
Ben Personick earned 500 total points
ID: 33740804
There is no way to have the batch file run without the command promt appearing that I am aware of except for these two options:

1. Using Task Scheduler to schedule the batch file to run as another user.

2. Using VBScript to call the batch file.

there may be a 3rd party utility whcih can also accomplish this.  otherwise the only thing you can do is minimize it.
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 33740861
these are the args apparently for consoletool but I kept getting errors running it about windows handle cant be found

/HIDE hides the console window of course.
/SHOW shows the previously hidden console window.
/NOMENU removes the system menu from the console window.


so the alternative to the shortcut might be to use the START command, It will not hide it but will make it minimized

START /MIN batchscript

this goes to a shortcut obviously. I think that should work.
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 33740910
There is this trick someone made. its a batch script that creates a vbscript (vbscript mentioned by QCubed first)
Wonder if you could use this http://www.windowsitpro.com/article/tips/jsi-tip-9242-how-can-i-hide-a-batch-window-.aspx
0
 
LVL 53

Expert Comment

by:Bill Prew
ID: 33742896
Grab a copy od CMDOW from:

http://www.commandline.co.uk/cmdow

and try adding the following at the top of the BAT file:

@cmdow @ /HID

~bp
0
 
LVL 35

Expert Comment

by:Joseph Daly
ID: 33746394
I have used this tool in the past with pretty good results. It is called runhid.vbs basically you call this file along with your batch file as an argument and then you can run the batch file contents hidden.

http://www.out-web.net/?p=229
0
 
LVL 4

Expert Comment

by:cmartell
ID: 33748317
You can convert the batch file to an exe with this tool.  One of the options is to have the exe run invisible:
http://download.cnet.com/Bat-To-Exe-Converter/3000-2069_4-10555897.html?tag=mncol;1
0
 

Author Closing Comment

by:Zak
ID: 33765853
good answer
0

Featured Post

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

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

I have published numerous articles here at Experts Exchange that present programs/scripts written in a language called AutoHotkey. Each of those articles has a brief paragraph describing where to download the product and how to install it. I have al…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

828 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