Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

A Little Tip For Using The START Command

Featured Replies

I thought I would share something I finally discovered that I was doing wrong when using the START command.

From what I've seen, most people use the START command in this manner:

START /WAIT C:\path\to\exe\some.exe

This works fine, but not if the path contains spaces.

So one would think that to use the START command with a path that contains spaces, you would simply use:

START /WAIT "C:\path with spaces\some.exe"

But it doesn't work that way.

Lets look at "START /?" in Command Prompt:

START ["title"] [/Dpath] [/MIN] [/MAX] [/sEPARATE | /SHARED]

[/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]

[/WAIT] [command/program]

[parameters]

The FIRST quoted parameter is actually the title of the window, so using the command:

START /WAIT "C:\path with spaces\some.exe"

will actually open a new command prompt window with a title of "C:\path with spaces\some.exe" and not actually execute some.exe

The trick is to provide a title parameter, which can be anything you want:

START "" /WAIT "C:\path with spaces\some.exe"

I just use double quotes with nothing in between (null)

I always just assumed this was a limitation of the START command or that I didn't know how to use it properly, until I came across a post on alt.msdos.batch.nt (Windows NT tricks, traps and undocumented features)

Your current START commands probably work just fine, but I find this usefull when the name of an installer EXE contains spaces, then I dont have to rename it (I like to preserve original filenames).

an what, if i use a command with no spaces in path but

variables? like:

start /wait msiexec /x{B060295C-E378-484C-91BE-DB5C41383FE9} /qb

  • Author
an what, if i use a command with no spaces in path but

variables? like:

start /wait msiexec /x{B060295C-E378-484C-91BE-DB5C41383FE9} /qb

I dont really know what you are asking?

I just use START "" /WAIT no matter what because if you pass any parameter thats quoted without first providing a title parameter, you'll run into problems.

You could do: start "" /wait msiexec /x{B060295C-E378-484C-91BE-DB5C41383FE9} /qb

even though its not really necessary in your case

Despite a good note from you, no path next to "start /wait" had spaces in all posts I've seen on this forum!

People type this:

start /wait "%systemdrive%\Install\appname\app.exe" /switch

With or without quotes, no difference.

Thank you for your contribution.

  • Author
Despite a good note from you, no path next to "start /wait" had spaces in all posts I've seen on this forum!

People type this:

start /wait "%systemdrive%\Install\appname\app.exe" /switch

With or without quotes, no difference.

Thank you for your contribution.

Nope, if you use quotes it will not work, try it!

1. Open a Command Prompt

2. Type: START /WAIT "%SYSTEMROOT%\system32\calc.exe"

3. It doesn't open up calc.exe

4. Remove the quotes and it does

quotes are used for spaces

start /wait "%systemdrive%\Install app name\appname.exe" /switch

  • Author
quotes are used for spaces

start /wait "%systemdrive%\Install app name\appname.exe" /switch

Yes, quotes are necessary for spaces, but if you dont provide a TITLE parameter using quotes, it will not work!

I dont think you guys are actually TRYING these commands before replying.

Will work:

START /WAIT C:\PATH\APP.EXE

START "title" /WAIT "C:\PATH\APP.EXE"

START "title" /WAIT "C:\LONG PATH\APP.EXE"

Will NOT work:

START /WAIT "C:\PATH\APP.EXE"

START /WAIT "C:\PATH WITH SPACES\APP.EXE"

Interesting post pinout.

Works as you described.

Thanks

For me putting the folder name in quotes works when using spaces:

start /wait path\"folder name"\filename.exe

  • 3 months later...

While we're discussing the start command, I'll mention another quirk I have noticed. If you use the /wait parameter, followed by the /b parameter, then the /wait parameter will not be honored. For those who don't recall, /b will completely hide the command window. However, usage of /b also seems to interfere with the /wait parameter, causing the script to immediately pass control to the next line even if the command invoked with /wait /b has not yet completed. Just FYI...

- Ravashaak

Thanks for that post, very handy in solving an issue I'd had at work with a couple of installers. Even though the paths had no spaces, it seems some .exe's work, and some dont :)

Thanks! This is good info. Even though most people seem to avoid spaces, this info should be made more promenant because it is behavior by the start command that goes against what feels like common sense. So if people have this problem it would be very confusing to debug.

Good to know.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.