Solved

batch file question

Posted on 2010-09-22
10
510 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

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 …
This article was inspired by a question here at Experts Exchange (http://www.experts-exchange.com/Software/Photos_Graphics/Images_and_Photos/Q_28629170.html). The requirements stated in that question are (1) reduce the file size of a large number of…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

808 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