?
Solved

batch file question

Posted on 2010-09-22
10
Medium Priority
?
518 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
[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
  • 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
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
LVL 14

Accepted Solution

by:
Ben Personick (Previously QCubed) earned 2000 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 56

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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

If like me you are one who spends a lot of time working and scripting with cmd.exe, sometimes it is handy to be able to quickly view a calendar for a given month and year. This script will quickly do just that!  Save the code posted below to a .bat …
YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

800 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