Scripting Question

Hide Command prompt

02/12/2014 3860 views

I am trying to push out a vbs script via Kace 1000 v5.5 which works but the problem is the command prompt window diplaying and stays on the screen until the script completes.  Any ideas how to minimize or have the command prompt hidden so that the script can be ran 100% silent?

Answer Summary:
1 Comment   [ + ] Show comment


  • Google for 'start command line switches'

All Answers

This content is currently hidden from public view.
Reason: Removed by member request For more information, visit our FAQ's.

Figured out how to make the bats run without needing the path to the bat file in the vbs script.


my script is:

CreateObject("Wscript.Shell").Run "runtest.bat",0,True

my bat file is:

reg.exe query hkcu\software\microsoft\windows\currentversion\run /s > C:\ProgramData\Dell\KACE\hkcuRunKeys.txt
wmic logicaldisk where "drivetype='4'" get deviceid,providername > C:\ProgramData\Dell\KACE\NetworkDrives.txt

the users never see anything as long as the .bat file is there.  If you name it wrong they will get an error popup.

Answered 02/13/2014 by: SMal.tmcc
Red Belt

  • I ran into cscript popping up that annoying black box the users call and think they are now hacked or have a virus.

    I found Wscript did not do this. The disadvantage of wscipt vs csript is if you have an error in your script the user gets a popup, so test, test ,test.
  • So do I need to create the .bat file also as a dependency and reference it in the vbs script I am trying to run?
    • what are you trying to do in your vbs script, could you post it.

      If you use a bat file to do the work, upload both the vb script and the bat file as shown in the picture above
      To me it is easier to create batch files to do a lot of my tasks, then use the vb script to hide my batch file. If you are running a vbs that does it's work by itself, try using wscript instead of csript for the file to launch.
      • I got it to work. Ran it as the wscript as suggested and it worked perfect! Thanks
      • The downfall if you have an error it pops a box to the user with wscript vs csript /c does not
      • Bummer any way around it? What time of errors would you expect to happen? Thanks again for all the advice
      • yea just try if out on a few machines before breaking it loose. I had a popup when it could not find the bat file I was calling. another error I got with one vbscript telling ,me I had an incorrect parameter. So just trying them out a on few machines with different bit or os versions would be a good idea.
    • Will do thanks.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login


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