How-To Geek

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)

Lowell Heddings, better known online as the How-To Geek, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on if you'd like.

  • Published 03/15/07

Comments (7)

  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

  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.

    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.

  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

  5. robmaister

    would you know how to run the program silently? I am trying to mix this and a batch file in the “Send To” menu, in order to open the menu itself. Because of the menu’s nature, it tacks on a %1 automatically, and hstart returns a “Failed to create process” error with the filename of the file I had selected. If there is no way, I will just bear with the cmd window, or see if I can write an autoit script instead..

  6. r0ck3t3r

    Nice idea, but what if the startup script fails? Are you able to see that? What I usually do is have the batch script access WSH and generate a msgbox with the error code. Just a thought. This way the batch can run silently unless it encounters a problem it can’t handle.

  7. Gregg DesElms

    I can’t tell from the NT Wind web site whether Hidden Start is still entirely freeware. It was really obvious, before (with earlier versions) that it was; but now I see that there’s a $19.95 cost…

    …though, admittedly, it says, right under its download button, that that’s for commercial use. So maybe it’s still free for private use. But, if so, then I just hope that there’s no nag screen or anything like that.

    Personally, I’m quite happy with the older absolutely and unambiguously freeware version that I’ve had on three straight machines, now. It works just fine for me, at least.

    I’ll tell you (and by so doing, share with your readers, just for their information) one cogent example of the use of Hidden Start. There’s a little freeware utility floating around out there which is a simple .EXE file, and which, if left-double-clicked-upon, will completely shut off a notebook computer’s LCD screen. And I don’t mean merely turn it black, but still leave the lights on behind the blackness. I mean completely turn it off. It’s very nice, and handy. Works great on any notebook on which I’ve ever tried it.

    However, the first version of it popped a command dialog (what some technically incorrectly call a “DOS prompt box” or “DOS box”) open on the screen during execution; and said box stayed open behind the by-then-turned-off screen’s blackness; and could be seen closing when the screen was turned back on again by jiggling the mouse or pressing any key. It was quite unsightly.

    However, by simply “wrapping” Hidden Start around the execution of the LCD screen turning-off .EXE file, that command dialog could no longer be seen popping-up. It was really nice.

    Subsequently, the author of the little .EXE file which turns-off a notebook’s LCD screen has released a version which he claims no longer pops-up that box; however, I’ve had some people report to me that wiggling the mouse or pressing any key no longer wakes-up that version; that one must specifically press the keyboard’s [Enter] key to wake it up… which is a problem. I’ve not tested it yet because, frankly, I’m perfectly happy with the old version with the old version of Hidden Start wrapped around it; and that’s what I’ve been putting on others’ machines, too.

    But my point is that this “Hidden Start” product — even in its old iteration — is excellent… one of the best little tips that this web site has ever offered! Of course, I knew about BEFORE it was offered here; but, hey, I’m nevertheless impressed that this web site agrees! [grin]

    Gregg L. DesElms
    Napa, California USA
    gregg at greggdeselms dot com

More Articles You Might Like

Enter Your Email Here to Get Access for Free:

Go check your email!