Windows start menu commands

start start

Запускает отдельное окно командной строки для запуска указанной программы или команды. Starts a separate Command Prompt window to run a specified program or command.

Синтаксис Syntax

Параметры Parameters

Параметр Parameter Описание Description
Задает заголовок, отображаемый в строке заголовка окна командной строки . Specifies the title to display in the Command Prompt window title bar.
/d

Указывает каталог запуска. Specifies the startup directory. /i /i Передает Cmd.exe среду запуска в новое окно командной строки . Passes the Cmd.exe startup environment to the new Command Prompt window. Если параметр /i не указан, используется текущая среда. If /i is not specified, the current environment is used. Служит для сворачивания (/min) или развертывания (/Макс) нового окна командной строки . Specifies to minimize (/min) or maximize (/max) the new Command Prompt window. Запускает 16-разрядные программы в отдельном пространстве памяти (/сепарате) или общей памяти (/Shared). Starts 16-bit programs in a separate memory space (/separate) or shared memory space (/shared). Эти параметры не поддерживаются на 64-разрядных платформах. These options are not supported on 64-bit platforms. Запускает приложение в указанном классе приоритета. Starts an application in the specified priority class. /аффинити /affinity Применяет указанную маску схожести процессоров (выраженную в виде шестнадцатеричного числа) к новому приложению. Applies the specified processor affinity mask (expressed as a hexadecimal number) to the new application. /Wait /wait Запускает приложение и ждет его завершения. Starts an application and waits for it to end. /елевате /elevate Запускает приложение от имени администратора. Runs application as administrator. /b /b Запускает приложение, не открывая новое окно командной строки . Starts an application without opening a new Command Prompt window. Обработка CTRL + C игнорируется, если приложение не поддерживает обработку CTRL + C. CTRL+C handling is ignored unless the application enables CTRL+C processing. Чтобы прервать работу приложения, используйте сочетание клавиш CTRL + BREAK. Use CTRL+BREAK to interrupt the application. [ [

. ]] Указывает запускаемую команду или программу. Specifies the command or program to start.

Указывает параметры для передачи в команду или программу. Specifies parameters to pass to either the command or the program. /? /? Отображение справки в командной строке. Displays help at the command prompt.

Комментарии Remarks

Вы можете запускать неисполняемые файлы с помощью сопоставления файлов, вводя имя файла в виде команды. You can run non-executable files through their file association by typing the name of the file as a command.

При выполнении команды, содержащей строку CMD в качестве первого маркера без квалификатора расширения или пути, команда CMD заменяется значением переменной COMSPEC. If you run a command that contains the string CMD as the first token without an extension or path qualifier, CMD is replaced with the value of the COMSPEC variable. Это не позволяет пользователям выбирать cmd из текущего каталога. This prevents users from picking up cmd from the current directory.

Если вы запускаете приложение с 32-битным графическим пользовательским интерфейсом (GUI), программа cmd не ждет завершения работы приложения, прежде чем вернуться в командную строку. If you run a 32-bit graphical user interface (GUI) application, cmd does not wait for the application to quit before returning to the command prompt. Такое поведение не происходит при запуске приложения из командного скрипта. This behavior does not occur if you run the application from a command script.

При выполнении команды, использующей первый токен, который не содержит расширение, Cmd.exe использует значение переменной среды ПАСЕКСТ, чтобы определить, какие расширения следует искать и в каком порядке. If you run a command that uses a first token that does not contain an extension, Cmd.exe uses the value of the PATHEXT environment variable to determine which extensions to look for and in what order. Значение по умолчанию для переменной ПАСЕКСТ: The default value for the PATHEXT variable is:

Обратите внимание, что синтаксис аналогичен переменной PATH с точкой с запятой (;) Отделение каждого расширения. Note that the syntax is the same as the PATH variable, with semicolons (;) separating each extension.

При поиске исполняемого файла, если нет совпадения с каким-либо расширением, запустите проверку, чтобы проверить, совпадает ли имя с именем каталога. When searching for an executable file, if there is no match on any extension, start checks to see if the name matches a directory name. Если это так, то Start открывает Explorer.exe по этому пути. If it does, start opens Explorer.exe on that path.

Примеры Examples

Чтобы запустить программу MyApp из командной строки и использовать текущее окно командной строки , введите: To start the Myapp program at the command prompt and retain use of the current Command Prompt window, type:

Чтобы просмотреть раздел справки по командной строке в отдельном окне командной строки с развернутым окном, введите: To view the start command-line help topic in a separate maximized Command Prompt window, type:

Windows commands

All supported versions of Windows (server and client) have a set of Win32 console commands built in.

This set of documentation describes the Windows Commands you can use to automate tasks by using scripts or scripting tools.

Prerequisites

The information that is contained in this topic applies to:

  • Windows Server 2019
  • Windows Server (Semi-Annual Channel)
  • Windows Server 2016
  • Windows Server 2012 R2
  • Windows Server 2012
  • Windows Server 2008 R2
  • Windows Server 2008
  • Windows 10
  • Windows 8.1

Command shell overview

The Command shell was the first shell built into Windows to automate routine tasks, like user account management or nightly backups, with batch (.bat) files. With Windows Script Host you could run more sophisticated scripts in the Command shell. For more information, see cscript or wscript. You can perform operations more efficiently by using scripts than you can by using the user interface. Scripts accept all Commands that are available at the command line.

Windows has two command shells: The Command shell and PowerShell. Each shell is a software program that provides direct communication between you and the operating system or application, providing an environment to automate IT operations.

PowerShell was designed to extend the capabilities of the Command shell to run PowerShell commands called cmdlets. Cmdlets are similar to Windows Commands but provide a more extensible scripting language. You can run Windows Commands and PowerShell cmdlets in Powershell, but the Command shell can only run Windows Commands and not PowerShell cmdlets.

For the most robust, up-to-date Windows automation, we recommend using PowerShell instead of Windows Commands or Windows Script Host for Windows automation.

You can also download and install PowerShell Core, the open source version of PowerShell.

Incorrectly editing the registry may severely damage your system. Before making the following changes to the registry, you should back up any valued data on the computer.

To enable or disable file and directory name completion in the Command shell on a computer or user logon session, run regedit.exe and set the following reg_DWOrd value:

To set the reg_DWOrd value, use the hexadecimal value of a control character for a particular function (for example, 0 9 is Tab and 0 08 is Backspace). User-specified settings take precedence over computer settings, and command-line options take precedence over registry settings.

Command-line reference A-Z

To find information about a specific command, in the following A-Z menu, click the letter that the command starts with, and then click the command name.

start

Starts a separate Command Prompt window to run a specified program or command.

Syntax

Parameters

Parameter Description
Specifies the title to display in the Command Prompt window title bar.
/d

Specifies the startup directory. /i Passes the Cmd.exe startup environment to the new Command Prompt window. If /i is not specified, the current environment is used. Specifies to minimize (/min) or maximize (/max) the new Command Prompt window. Starts 16-bit programs in a separate memory space (/separate) or shared memory space (/shared). These options are not supported on 64-bit platforms. Starts an application in the specified priority class. /affinity Applies the specified processor affinity mask (expressed as a hexadecimal number) to the new application. /wait Starts an application and waits for it to end. /elevate Runs application as administrator. /b Starts an application without opening a new Command Prompt window. CTRL+C handling is ignored unless the application enables CTRL+C processing. Use CTRL+BREAK to interrupt the application. [ [

. ]] Specifies the command or program to start.

Specifies parameters to pass to either the command or the program. /? Displays help at the command prompt.

Remarks

You can run non-executable files through their file association by typing the name of the file as a command.

If you run a command that contains the string CMD as the first token without an extension or path qualifier, CMD is replaced with the value of the COMSPEC variable. This prevents users from picking up cmd from the current directory.

If you run a 32-bit graphical user interface (GUI) application, cmd does not wait for the application to quit before returning to the command prompt. This behavior does not occur if you run the application from a command script.

If you run a command that uses a first token that does not contain an extension, Cmd.exe uses the value of the PATHEXT environment variable to determine which extensions to look for and in what order. The default value for the PATHEXT variable is:

Note that the syntax is the same as the PATH variable, with semicolons (;) separating each extension.

When searching for an executable file, if there is no match on any extension, start checks to see if the name matches a directory name. If it does, start opens Explorer.exe on that path.

Examples

To start the Myapp program at the command prompt and retain use of the current Command Prompt window, type:

To view the start command-line help topic in a separate maximized Command Prompt window, type:

Troubleshoot Start menu errors

Start failures can be organized into these categories:

  • Deployment/Install issues — Easiest to identify but difficult to recover. This failure is consistent and usually permanent. Reset, restore from backup, or rollback to recover.
  • Performance issues — More common with older hardware, low-powered machines. Symptoms include: High CPU utilization, disk contention, memory resources. This makes Start very slow to respond. Behavior is intermittent depending on available resources.
  • Crashes — Also easy to identify. Crashes in Shell Experience Host or related can be found in System or Application event logs. This can be a code defect or related to missing or altered permissions to files or registry keys by a program or incorrect security tightening configurations. Determining permissions issues can be time consuming but a SysInternals tool called Procmon will show Access Denied. The other option is to get a dump of the process when it crashes and depending on comfort level, review the dump in the debugger, or have support review the data.
  • Hangs — in Shell Experience host or related. These are the hardest issues to identify as there are few events logged, but behavior is typically intermittent or recovers with a reboot. If a background application or service hangs, Start will not have resources to respond in time. Clean boot may help identify if the issue is related to additional software. Procmon is also useful in this scenario.
  • Other issues — Customization, domain policies, deployment issues.

Basic troubleshooting

When troubleshooting basic Start issues (and for the most part, all other Windows apps), there are a few things to check if they are not working as expected. For issues where the Start menu or subcomponent isn’t working, you can do some quick tests to narrow down where the issue may reside.

Check the OS and update version

  • Is the system running the latest Feature and Cumulative Monthly update?
  • Did the issue start immediately after an update? Ways to check:
    • PowerShell:[System.Environment]::OSVersion.Version
    • WinVer from CMD.exe

Check if Start is installed

If Start fails immediately after a feature update, on thing to check is if the App package failed to install successfully.

If Start was working and just fails intermittently, it’s likely that Start is installed correctly, but the issue occurs downstream. The way to check for this problem is to look for output from these two PS commands:

get-AppXPackage -Name Microsoft.Windows.ShellExperienceHost

get-AppXPackage -Name Microsoft.Windows.Cortana

Failure messages will appear if they aren’t installed

If Start is not installed, then the fastest resolution is to revert to a known good configuration. This can be rolling back the update, resetting the PC to defaults (where there is a choice to save to delete user data), or restoring from backup. No method is supported to install Start Appx files. The results are often problematic and unreliable.

Check if Start is running

If either component is failing to start on boot, reviewing the event logs for errors or crashes during boot may pin point the problem. Booting with MSCONFIG and using a selective or diagnostic startup option will eliminate and/or identify possible interference from additional applications.

  • get-process -name shellexperiencehost
  • get-process -name searchui

If it is installed but not running, test booting into safe mode or use MSCONFIG to eliminate third-party or additional drivers and applications.

Check whether the system a clean install or upgrade

  • Is this system an upgrade or clean install?
    • Run test-path «$env:windir\panther\miglog.xml»
    • If that file does not exist, the system is a clean install.
  • Upgrade issues can be found by running test-path «$env:windir\panther\miglog.xml»

Check if Start is registered or activated

  • Export the following Event log to CSV and do a keyword search in a text editor or spreadsheet:
    • Microsoft-Windows-TWinUI/Operational for Microsoft.Windows.ShellExperienceHost or Microsoft.Windows.Cortana
      • «Package was not found»
      • «Invalid value for registry»
      • «Element not found»
      • «Package could not be registered»

If these events are found, Start is not activated correctly. Each event will have more detail in the description and should be investigated further. Event messages can vary.

Other things to consider

When did the problem start?

  • Top issues for Start menu failure are triggered
    • After an update
    • After installation of an application
    • After joining a domain or applying a domain policy
  • Many of those issues are found to be
    • Permission changes on Registry keys or folders
    • Start or related component crashes or hangs
    • Customization failure

To narrow down the problem further, it’s good to note:

What is the install background?

  • Was this a deployment, install from media, other
  • Using customizations?
    • DISM
    • Group Policy or MDM
    • copyprofile
    • Sysprep
    • Other
  • Group policy settings that restrict access or permissions to folders or registry keys can cause issues with Start performance.
  • Some Group Policies intended for Windows 7 or older have been known to cause issues with Start
  • Untested Start Menu customizations can cause unexpected behavior by typically not complete Start failures.
Читайте также:  Kak ustanovit windows na disk
Оцените статью