Subscribe to How-To Geek

Recommended: Click Here to Run a Free Scan for Common PC Errors   [Sponsored Link]

Hide Flashing Command Line and Batch File Windows On Startup

I use a lot of batch files, command line applications, and even Ruby scripts (which run from the command line). One of the things that has always irritated me is the flashing command prompt window when I make a shortcut for a batch file, especially when I put it into the startup folder to run when I first login.

There's a really useful utility that you can use called Hidden Start (hstart), which will start up a command line application hidden in the background, which eliminates the flashing window.

If you launch the utility with no parameters, it will pop up the settings dialog.

When using this utility, there are three key things to remember: Use the /NOWINDOW parameter to keep the window hidden, use the /D=path argument to make sure that the current directory is set correctly, and make sure to surround your application argument with quotes.

For instance, if I had a batch file stored in c:\scripts\mybatch.bat, I would start it by using the following parameters in my shortcut:

hstart /NOWINDOW /D=c:\scripts "c:\scripts\mybatch.bat"

You'll probably want to copy hstart.exe into somewhere in the system path, for instance C:\windows might work nicely.

Download Hidden Start (hstart)

The Geek is the founder of How-To Geek and a geek enthusiast. When he's not coming up with great how-to articles, he's probably writing at his personal blog. This article was written on 03/15/07 and tagged with: Windows, Customizing: Tips & Tweaks, Windows Vista, Vista Tips & Tweaks

Comments (4)

  1. Mark Woody

    Hi I need a better Geek than myself to help me out. I am dying and am on disability, I don't feel good and major time on the computer is hard on me. I initially bought a 250 GB SATA 150 drive and put Vista on it. I noticed Battlefield 2142 didn't work to well and my Belkin Nostromo N52 game pad does not have a Vista driver. I just purchased a 350 GB 300 drive, I know that should be my C drive with both Vista and XP on there to take care of my troubles, plus maybe give me a speed boost, I don't know if that really makes a difference but it is better than Ultra 133 and SATA 150 or whatever they call it. Is there going to be a speed difference? Anyway in the old 386 days and 486 days, I made a batch file, that game me load up options, one for gaming taking care of that vital first bit of ram, or for regular use. For right now could one write a boot up option bat file that lets hit 1 to boot VISTA for everything but gaming or hit 2 to go to another drive with (the 350 GB) drive with my games and XP on it, then later put VISTA 64 home premium on it. I do not have the upgradeable version. I remember in the old days I colored it yellow and after 20 secs it went to the default parameters. Is there anyone if it is possible who could create a boot up option because the OS Vista and XP respectively are on different drives, until I can fix it the right way. Could any one right me a batch file, and where to insert it or is this a long way to do things, I can just change boot up drive in Bios but that is a pain… So much for my home made computer skills and I've built over 20. I get fatigued real easy and can stay with it, like I use to could. Anyway just asking. I love your site and while trying to figure out this boot method based on the old days i found several helpful tips and ways to do things. Nice Site!

    Thank You!
    Mark Woody
    rogue-diver@comcast.net

  2. The Geek

    What you are looking for is the EasyBCD utility, which will let you customize your Vista bootup options to boot off the other drive.

    http://neosmart.net/dl.php?id=1

    Also fyi, we just opened a forum here, which is a good place to ask these types of questions, because a lot more people will see your question right away.

    http://www.howtogeek.com/forum/

  3. Zac S

    Just a little FYI that this utility is great for any computer that doesn't have a local group policy or the local group policy is over written by a domain policy. Another way to fire off those batch files without ever showing the command line interface is thru the use of a group policy know as logon scripts. Go to Start>Run type gpedit.msc and expand the Windows Settings under User Configuration. You will see scripts and then you can choose from Logon or Logoff. You can also do the same under the Computer Configuration only difference is these scripts are Startup and Shut Down. The difference is when the computer is starting up before it gets to the login prompt it runs the Startup Script, after a user has logged on, it runs the Logon Script. The idea is the same for Logoff and Shut Down for those processes. Hope this little tidbit helps out where practical.

  4. Andreas

    Fantastic. I use this with a batch file that send my machine to sleep. For some unfathomable reason Microsoft has stopped putting a "Sleep" hotkey on keyboards. So I remap the "Log Off Key". The file is very simple: rundll32.exe powrprof.dll,SetSuspendState Sleep


Leave a Comment




Leave your friendly comment here. If you have a computer help question, leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Copyright © 2006-2008 HowToGeek.com. All Rights Reserved.