/build/static/layout/Breadcrumb_cap_w.png

Hide Command Prompt window?

Hello,

When scripting software installs a blank command prompt window is always showing.  All our clients are running Windows 7 64bit.  Our old means of deploying software never had this issue and so we could deploy software to users even while they were working at their stations.  Can anyone tell me why this is happening? or better yet, how to hide it?  The cmd window is blank and the switch (/qn) should mean that nothing shows whatsoever.  Any help would be greatly appreciated.


0 Comments   [ + ] Show comments

Answers (6)

Answer Summary:
http://www.itninja.com/question/completely-invisible-batch-file || http://www.f2ko.de/programs.php?lang=en&pid=b2e
Posted by: Ifan 12 years ago
Second Degree Green Belt
1

I'm assuming you are using a batch file to run multiple installations in order.

As long as it's set to run interactively the command window will be displayed. You can make a batch script start minimized, but it will still be there in the taskbar.

Your best bet is to either write a vbscript and run it using wshell or use powershell with the command line parameter "-windowstyle hidden". Be aware that a powershell window will be shown for 5-25 seconds during it's initial load. The only workaround for this is to make a powershell wrapper program that picks up on exitcodes etc.

 

Posted by: er.hsingh 12 years ago
Orange Senior Belt
1

Use Jscript

var WindowStyle_Hidden = 0
var objShell = WScript.CreateObject("WScript.Shell")
var result = objShell.Run("cmd.exe /c xyz.bat", WindowStyle_Hidden)

Posted by: robbyburmeister 12 years ago
White Belt
0

Have you tried using the /quiet switch instead?


Comments:
  • I forgot to mention that most of what I have been trying to deploy is vendor-supplied msi's. When running manually or from our Altiris server, everything behaves as one would expect. /qn = no UI, /qb = progress bar, etc. - tdickert 12 years ago
Posted by: Sweede 12 years ago
Second Degree Green Belt
0

More Info deploying from what ? System ? User or NT system. Context

 

Posted by: adilrathore 11 years ago
4th Degree Black Belt
0

It is always better to use a scripting language in order to avoid such issues like VbScript.

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ