Command prompt before windows

PROMPT – изменение приглашения командной строки CMD Windows.

Формат командной строки:

текст — Новое приглашение командной строки.

Приглашение может включать обычные символы и следующие коды:

$A & (амперсанд)
$B | (вертикальная черта)
$C ( (левая круглая скобка)
$D Текущая дата
$E ESC (символ ASCII с кодом 27)
$F ) (правая круглая скобка)
$G > (знак «больше»)
$H BACKSPACE (удаление предыдущего символа)
$L $N Текущий диск
$P Текущие диск и каталог
$Q = (знак равенства)
$S (пробел)
$T Текущее время
$V Номер версии Windows
$_ Возврат каретки и перевод строки
$$ $ (символ доллара)

Когда расширенная обработка команд включена, команда PROMPT поддерживает следующие дополнительные символы форматирования:

$+ Отображение нужного числа знаков плюс (+) в зависимости от текущей глубины стека каталогов PUSHD, по одному знаку на каждый сохраненный путь.
$M Отображение полного имени удаленного диска, связанного с именем текущего диска, или пустой строки, если текущий диск не является сетевым.

При использовании PROMPT без параметров, выполняется установка текста приглашения в значение по умолчанию — $P$G — текущий диск и каталог и знак “Больше”.

prompt /? — отобразить подсказку по использованию команды.

В тексте приглашения можно использовать значение переменных окружения:

prompt %computername% $P$G — перед стандартным приглашением будет отображаться имя компьютера.

prompt $C%computername%$F $P$G — то же, что и в предыдущем примере, но имя компьютера будет заключено в скобки.

prompt $c%computername%$F$M$P$G — в скобках будет отображаться имя локального компьютера, путь сетевого ресурса в формате UNC, буква сетевого диска и путь, например:

(COMP0)\\SERVER\install i:\Piriform > — Локальный компьютер COMP0, сетевой ресурс \\SERVER\install , подключен как диск I: , текущий каталог — Piriform

prompt $D$_$T$_$P$G — текст приглашения представлен тремя строками, в первой отображается дата, во второй – время, в третьей – полный путь текущего каталога. Пример:

В примере, время представлено с точностью до сотых долей секунды — 17:50:58,62 . Для того, чтобы избавиться от них, и знака запятой в том числе, можно использовать три кода $H для удаления 3-х предшествующих им символа:

prompt $D$_$T$H$H$H$_$P$G — то же, что и в предыдущем примере, но время отображается без долей секунды — 17:50:58

Command prompt before windows

  • Home
  • Tutorials & Tech Support Guides
  • Windows 7 Tutorials
  • How to start an Elevated Command Prompt in Windows 7 and Vista

How to start an Elevated Command Prompt in Windows 7 and Vista

Lawrence Abrams
  • April 12, 2010
  • Read 372,432 times

A Command Prompt allows you to run programs, manipulate Windows settings, and access files by typing in commands that you wish to execute. To start a Command Prompt you simply need to type cmd.exe in the search field in the Start menu or click on Start, then Accessories, and then click on the Command Prompt icon. A window will appear, called the Command Prompt, that will open in your user profile folder and wait for you to issue commands. An example of this Command Prompt can be seen below:


Default Command Prompt Window

The problem with the standard Command Prompt is that any commands you run in it operate as if you do not have Administrative privileges. So you won’t be able to run any commands or access any files that require these privileges.

Читайте также:  Windows 10 не открывает письма

It is for this reason, that we need to be able to open what is called an Elevated Command Prompt, which is a Command Prompt that allows you to access files and programs as an Administrator of the machine. There are three methods that can be used to open an Elevated Command Prompt and I have outlined them both below.

Method 1: Run As Administrator from shortcut

The first method is to launch the Command Prompt as an Administrator. This can be achieved by clicking on the Start menu, then selecting All Programs, and then Accessories. You will now see a shortcut labeled Command Prompt. Right-click on it and select Run as administrator as shown below.


Run as administrator

When you select Run as administrator a User Account Control prompt will appear asking if you would like to allow the Command Prompt to be able to make changes on your computer.


User Account Control Prompt

Click on the Yes button and you will now be at the Elevated Command Prompt as shown below.


Elevated Command Prompt

Please note that the Elevated Command Prompt starts in the Windows System32, for example C:\Windows\System32\, folder rather than the User Profile. In this Elevated Command Prompt you can now launch programs or access files that require Administrative privileges.

Method 2: Use Ctrl+Shift+Enter to launch Cmd.exe

It is also possible to launch cmd.exe from the Start Menu search field by using the Ctrl+Shift+Enter keyboard combination. To use this method, click on the Start menu and in the search field enter cmd as shown in the image below.


cmd.exe in the Start Menu search field

Once you type cmd, press the Ctrl+Shift+Enter keyboard combination and cmd.exe will be launched as if you selected Run as Administrator. You will then see a User Account Control prompt asking if you would like to allow the Command Prompt to be able to make changes on your computer. Click on the Yes button and you will now be at the Elevated Command Prompt.

Method 3: Create an Elevated Command Prompt Shortcut

If you find that you use the Elevated Command Prompt often and would like an easier way to launch it, you can make a short cut to it on your desktop or pinned to your Taskbar. To do this you can click on the Start menu, then selecting All Programs, and then Accessories. You will now see a shortcut labeled Command Prompt. Right-click on it and either drag it to your desktop and copy it there, select Pin to Start Menu, or select Pin to Taskbar (Windows 7 only). Once the Command Prompt shortcut is where you want it, right-click on it and select Properties.

In the properties screen, make sure you are on the Shortcut tab and click on the Advanced button. You will now be at a screen similar to the one below.


As shortcut’s advanced properties screen

At this screen put a checkmark in the box labeled Run as administrator, as shown above, and then click the OK button. Then click OK one more time to exit the shortcut’s properties. Now whenever you double-click on this shortcut it will automatically run the Command Prompt with elevated privileges.

For more information on the Command Prompt and its available commands you can view our Introduction to the Windows Command Prompt tutorial. As always, if you have any questions regarding this procedure please ask us in our Windows 7 forum.

Users who read this also read:

How to enable and disable the Windows Administrator account

The built-in Administrator account is disabled by default in Windows 8, Windows 7, and Windows Vista. It is disabled to enhance security as this is a common account targeted by hacking scripts and hackers when they try and access your computer without your permissions. In my opinion, you should leave the Administrator account disabled, but as there have been many requests for this information, I .

Читайте также:  Windows сертификаты с открытым ключом

How to rename the built-in Administrator account in Windows

The built-in Administrator account is one of the most targeted account names by malicious programs and hackers that are attempting to access your computer without your permission. It is therefore a wise security precaution to rename the Administrator account to another less common name so that it can no longer be targeted. By default, the Administrator account in Windows Vista, Windows 7, and .

Introduction to the Windows Command Prompt

Before Windows was created, the most common operating system that ran on IBM PC compatibles was DOS. DOS stands for Disk Operating System and was what you would use if you had started your computer much like you do today with Windows. The difference was that DOS was not a graphical operating system but rather purely textual. That meant in order to run programs or manipulate the operating system .

How to enable GodMode in Windows

Windows 8, Windows 7, Server 2008, and flavors of Windows Vista provide an unpublished ability to create a control panel called GodMode that alllows you to have easy access to almost all administrative tasks that you would like to use in Windows. This new window is called GodMode because it puts all aspects of the management of Windows at your fingertips in one location. This allows you to quickly .

How to open an Elevated Command Prompt in Windows 8

A Windows Command Prompt is a screen where you type in commands that you would like to execute. The command prompt is very useful if you want to use batch files, basic scripting, or to perform various administrative tasks. The normal command prompt has one shortcoming and that is that you cannot directly launch programs that require administrative privileges in order to work properly. This is .

5 ways to open Command Prompt when Windows doesn’t boot

The Command Prompt is a powerful tool that can be used for many purposes, including troubleshooting and fixing problems with Windows. Starting it is easy if Windows is working correctly, but what do you do when Windows refuses to load? How do you “boot” to Command Prompt (cmd.exe) “from BIOS” to fix the issues that you are having? This tutorial shows you how to do it:

1. How to open Command Prompt at boot using the Shift + F10 keyboard shortcut

In our opinion, this is the best method of opening Command Prompt at boot, and that’s why we’re showing it first. It can be done immediately after BIOS POST, and it works no matter what Windows version you have installed on your PC. It even works if you don’t have Windows or any other operating system installed on your computer. Here’s what you need to do:

First, use a Windows installation media (DVD, USB stick, etc.) to boot your computer or device. It doesn’t matter whether the installation media is for Windows 10, Windows 7, or Windows 8.1: any of them works.

When the Windows setup wizard shows up, simultaneously press the Shift + F10 keys on your keyboard. This keyboard shortcut opens Command Prompt before boot.

NOTE: If you don’t already have a Windows setup DVD or USB stick at hand, read these tutorials to learn how to create your own Windows setup drive: Download ISO files with Windows 10 and Office (all versions) and How to use the Windows USB/DVD Download Tool.

2. How to boot to Command Prompt using a Windows 10 (or 8.1) installation USB memory stick or DVD

This method to open Command Prompt “from BIOS” is similar to the previous one, except it uses more clicks than keys. 🙂

Start your computer and, from the BIOS boot menu, choose the drive where you have the Windows 10 (or 8.1) Setup files as the boot device. Wait for the Windows Setup to load, and choose the language and keyboard that you want to use. Then, press Next.

Don’t click/tap on Install now. Instead, click or tap “Repair your computer” on the bottom left corner of the wizard or press R on your keyboard.

Читайте также:  How to install 7zip linux

You are asked to choose an option on how to continue. Choose Troubleshoot.

You are shown several advanced options. Here, click or tap on Command Prompt.

The Command Prompt (cmd.exe) is loaded, and you can use it to repair your non-working Windows system or do anything else you wish.

3. How to start Command Prompt when Windows 10 (or 8.1) doesn’t boot, using a USB repair drive

If you have a Windows 10 or Windows 8.1 recovery drive, you can use it to start the Command Prompt. Insert the drive, then start your computer and use the BIOS boot menu to select the removable repair drive as the boot device. When the recovery drive loads, it first asks you to choose the keyboard layout. Select the one that you want to use.

Then, you can choose one of several options. Select Troubleshoot.

In the list of Advanced options, click or tap on Command Prompt.

The Command Prompt is now loaded, and you can use it.

4. How to load Command Prompt “at startup” using a Windows 7 setup CD/DVD or USB memory stick

If Windows 7 is not able to load correctly, you can boot using an installation disc. Start your computer and configure it to boot from the DVD drive or the USB memory stick where you have the Windows 7 setup files. Wait for the Windows 7 setup wizard to show up, choose the language that you want to use, and click Next.

Then, click “Repair your computer.”

The System Recovery Options window is now loaded. Click Command Prompt at the bottom of the window.

The Command Prompt is shown, and you can use it for troubleshooting purposes.

5. How to get to Command Prompt “from BIOS” using a Windows 7 repair disc

If Windows 7 is not able to load correctly, you can boot using a recovery disc that you can create on a working Windows 7 computer. Here’s a tutorial on how to create his drive: What is a system repair disc and how to create one in Windows. Start your computer and, in the BIOS boot menu, choose the system repair drive as the boot device. After the repair disc is loaded, select the desired language for the keyboard, click Next, and wait for the repair disc to scan the operating systems available on your computer. Select Windows 7 and click Next.

If you have multiple user accounts on your computer, you are asked to select a username and then type the password for it. Do so and then click on OK. The System Recovery Options window is now loaded. Click Command Prompt at the bottom of the window.

I’ve managed to load Command Prompt at startup. What’s next?

After you’ve managed to load the Command Prompt at startup, you can use advanced tools such as diskpart or bootrec to repair your system’s partitions, boot records, write a new boot sector (if needed), or rebuild the Boot Configuration Data.

If these are the things you must do to get your PC up and running again, these tutorials might interest you: How to use diskpart, chkdsk, defrag, and other disk-related commands and How to use the Command Prompt to fix issues with your PC’s boot records.

Why did you want to boot to Command Prompt?

Hopefully, this guide was useful to you when you’ve encountered issues with your Windows computers and devices. If you know other ways to start the Command Prompt when Windows refuses to load correctly, don’t hesitate to share them using the comments below.

Оцените статью