Command windows startup options

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:

WinDbg Preview — Command line startup options

Starting WinDbg Preview

After WinDbg Preview is installed, WinDbgX.exe is available to run from any directory location.

Command line startup options

This following tables summarizes the available command line options.

General Options

Option Description
-c «command» Executes a command line after the debugger is attached. This command must be enclosed in quotation marks. Multiple commands can be separated with semicolons.
-v Enables verbose output in the debugger.
-T Title Sets the window title.
-logo LogFile Log Open. Begins logging information to a log file. If the file exists, it will be overwritten.
-loga LogFile Log Append. Begins logging information to a log file. If the file exists, it will be appended to.
-e EventHandle Signals the event with the given handle after the next exception in a target.
-? Displays a summary of commands available.

Kernel Options

Option Description
-k [ConnectType] Starts a kernel debugging session. If -k is used without any ConnectType options following it, it must be the final entry on the command line.
-kqm Starts KD in quiet mode.
-kl Starts a kernel debugging session on the same machine as the debugger.
-kx ExdiOptions Starts a kernel debugging session using an EXDI driver.
-d After a reboot, the debugger will break into the target computer as soon as a kernel module is loaded.

User Mode Options

Option Description
-o Debugs all processes launched by the target application (child processes).
-g Ignores the initial breakpoint in target application.
-G Ignores the final breakpoint in target application.
-pv Specifies that the debugger should attach to the target process noninvasively.
-hd Specifies that the debug heap should not be used.
-cimp Specifies that any processes created will use an implicit command-line set by the server instead of a user-given command-line string from the client.

Target Options

Option Description
-remote ClientTransport Connects to a debugging server that is already running. For an explanation of the possible ClientTransport values, see Activating a Debugging Client. When this parameter is used, it must be the first parameters on the command line.
-server ServerTransport Creates a debugging server that can be accessed by other debuggers. For an explanation of the possible ServerTransport values, see Activating a Debugging Server.
-premote SmartClientTransport Creates a smart client, and connects to a process server that is already running. For an explanation of the possible SmartClientTransport values, see Activating a Smart Client.
-p PID Specifies the decimal process ID to be debugged.
-tid TID Specifies the thread ID of a thread to be resumed when the debugging session is started.
-psn ServiceName Specifies the name of the service contained in the process to be debugged. This is used to debug a process that is already running.
-pn ProcessName Specifies the name of the process to be debugged.
-z DumpFile Specifies the name of a crash dump file to debug. If the path and file name contain spaces, this must be surrounded by quotation marks.
-debugArch x86 -or- amd64 Override the autodetect behavior and set the target bitness for the debugger.
-loadSession Load a saved session configuration file.
-setupFirewallRules Configures the required firewall rules on the local system to allow kernel debugging using KDNET.
-openPrivateDumpByHandle Handle Microsoft internal use only. Specifies the handle of a crash dump file to debug.
-benchmarkStartup Microsoft internal use only. Runs a startup benchmark and appends the result to a file.

Symbol Options

Option Description
-y SymbolPath Specifies the symbol path to use. Separate multiple paths with a semicolon (;). If the path contains spaces, it should be enclosed in quotation marks. For details, and for other ways to change this path, see Symbol Path.
-n Noisy symbol load. Enables verbose output from symbol handler.
-i ImagePath Sets the image search path to use.
-sdce Causes the debugger to display ‘File access error’ messages during symbol load.
-ses Causes the debugger to perform a strict evaluation of all symbol files and ignore any questionable symbols.
-sicv Causes the symbol handler to ignore the CV record
-sins Causes the debugger to ignore the symbol path and executable image path environment variables.
-snc Causes the debugger to turn off C++ translation.
-snul Disables automatic symbol loading for unqualified names.
-sup Causes the symbol handler to search the public symbol table during every symbol search
-sflags Sets all the symbol handler options at once.

Source Path Options

Option Description
-srcpath Specifies the source path to use on the debugging server.
-lsrcpath Specifies the source path to use on the local client.

If you are in a local debugger session, srcpath and lsrcpath are effectively the same (your “server” is your local session). For remote debugging there are situtations where you may want to set these to different values. For more information about remote debugging see, Remote Debugging.

Exception handling

Option Description
-x Enable second-chance handling only for access violation exceptions.
-xe Exception Enable first-chance exception handling for the specified exception.
-xd Exception Enable second-chance exception handling for the specified exception.
-xn Exception For the given exception, disable first- and second-chance-handling, and only display a message on the console.
-xi Exception Completely ignore the given exception, disabling first- and second-chance handling, and not outputing anything to the console.

For a list of exceptions that can be specified, see Event Definitions and Defaults.

Post Mortem

Option Description
-I Sets WinDbg Preview as the default post-mortem debugger for the system.
-IS Sets WinDbg Preview as the default post-mortem debugger for the system silently, with only errors being reported.

Deprecated Options

Option Description
-Q Deprecated command-line option.
-QY Deprecated command-line option.
-QS Deprecated command-line option.
-QSY Deprecated command-line option.
-WX Deprecated command-line option.

For general information on the startup parameters, see WinDbg Command-Line Options.

You can use -? to list the supported command line options.

Windows Startup Settings (including safe mode)

With Windows Startup Settings you can start Windows in different advanced troubleshooting modes to help you find and fix problems on your PC.

Get to Windows Startup Settings in PC settings

Swipe in from the right edge of the screen, tap Settings, and then tap Change PC settings.
(If you’re using a mouse, point to the lower-right corner of the screen, move the mouse pointer up, click Settings, and then click Change PC settings.)

Under PC settings, tap or click Update and recovery, and then tap or click Recovery.

Under Advanced startup, tap or click Restart now.

Once your PC restarts, on the Choose an option screen, tap or click Troubleshoot. If you don’t see the Startup Settings option, tap or click Advanced options.

Tap or click Startup Settings and then Restart.

On the Startup Settings screen, choose the startup setting you want.

Sign in to your PC with a user account that has administrator rights.

Get to Windows Startup Settings in the Windows Recovery Environment

If you can’t start your PC, follow these instructions to get to the Windows Recovery Environment. You’ll need to connect a keyboard to complete the steps.

Do one of the following, depending on whether you have installation media (such as a DVD or USB flash drive):

If you have installation media for Windows 8.1, start your computer from the installation media. Insert the DVD or USB flash drive and restart your computer. If you see a message asking you to “Press any key to boot from DVD,” do so. If you don’t see the message, you might need to change the boot order in your computer’s BIOS settings so that it first starts from the DVD or USB. When you see the Install Windows page, tap or click Repair your computer to start the Windows Recovery Environment.

If you don’t have installation media, use the power button to restart your computer three times. This will start the Windows Recovery Environment.

In the Windows Recovery Environment, on the Choose an option screen, tap or click Troubleshoot.

Tap or click Startup Settings. If you don’t see Startup Settings, tap or click Advanced options, and then tap or click Startup Settings.

Tap or click Restart, and then wait while your computer restarts.

On the Startup Settings screen, choose an option.

Sign in to your computer with a user account that has administrator rights.

Some options, such as safe mode, start Windows in a limited state where only essential programs are started. Other options start Windows with advanced features (typically used by system admins and IT pros). For more info, go to the Microsoft TechNet website for IT pros.

Note: If you’re using BitLocker, you’ll need to suspend it before you can get to Windows Startup Settings. If you’re using Windows RT 8.1, you may be asked to enter your Device Encryption recovery key to get to the Startup settings.

Starts Windows in an advanced troubleshooting mode intended for IT pros and system admins.

Creates a file, ntbtlog.txt, that lists all the drivers that are installed during startup and that might be useful for advanced troubleshooting.

Starts Windows using your current video driver and using low resolution and refresh rate settings. You can use this mode to reset your display settings.

Safe mode starts Windows with a minimal set of drivers and services to help troubleshoot issues. If a problem doesn’t reappear when you start your PC in safe mode, you can eliminate the default settings and basic device drivers and services as possible causes. There are three different safe mode options:

Enable Safe Mode. Starts Windows with a minimal set of drivers and services.

Enable Safe Mode with Networking. Starts Windows in safe mode and includes the network drivers and services needed to access the Internet or other computers on your network.

Enable Safe Mode with Command Prompt. Starts Windows in safe mode with a Command Prompt window instead of the usual Windows interface. This option is intended for IT pros and system admins.

If the problem doesn’t occur when you restart your PC in safe mode, it’s unlikely that the basic settings, files, and drivers in Windows are the cause of the problem. Try starting all of the apps on your desktop that you commonly use one by one (including the apps in your Startup folder) to see if a specific app might be causing the problem. If one of the apps is causing the problem, uninstall it or contact the software publisher. If the problem appears while in safe mode, or you still can’t find the problem, you can try refreshing or resetting your PC. For more info, see How to refresh, reset, or restore your PC.

Читайте также:  Отменить залипание клавиш windows
Оцените статью