Set windows file location

Windows Vista, Windows 7, Windows Server 2008 R2, Windows 8.1, and Windows 10 setup log file locations

This article describes where to locate these log files and which log files are most useful for troubleshooting each setup phase of Windows 7, of Windows Server 2008 R2, and of Windows Vista.

Original product version: В Windows 10 — all editions, Windows Server 2019, Windows Server 2016
Original KB number: В 927521

Introduction

Windows setup log files are in different locations on the hard disk. These locations depend on the setup phase.

Support for Windows Vista without any service packs installed ended on April 13, 2010. To continue receiving security updates for Windows, make sure you’re running Windows Vista with Service Pack 2 (SP2). For more information, see Windows XP support has ended.

Down-level phase

The downlevel phase is the Windows setup phase that is running within the previous operating system. The following table lists important log files in this setup phase.

Log file Description
C:\WINDOWS\setupapi.log Contains information about device changes, driver changes, and major system changes, such as service pack installations and hotfix installations.

This log file is used only by Microsoft Windows XP and earlier versions.

C:$WINDOWS.

BT\Sources\Panther\setupact.log

Contains information about setup actions during the installation.
C:$WINDOWS.

BT\Sources\Panther\setuperr.log

Contains information about setup errors during the installation.
C:$WINDOWS.

BT\Sources\Panther\miglog.xml

Contains information about the user directory structure. This information includes security identifiers (SIDs).
C:$WINDOWS.

BT\Sources\Panther\PreGatherPnPList.log

Contains information about the initial capture of devices that are on the system during the downlevel phase.

Windows Preinstallation Environment phase

The Windows Preinstallation Environment (Windows PE or WinPE) phase is the Windows setup phase that occurs after the restart at the end of the downlevel phase, or when you start the computer by using the Windows installation media. The following table lists important log files in this setup phase.

Log file Description
X:$WINDOWS.

BT\Sources\Panther\setupact.log

Contains information about setup actions during the installation.
X:$WINDOWS.

BT\Sources\Panther\setuperr.log

Contains information about setup errors during the installation.
X:$WINDOWS.

BT\Sources\Panther\miglog.xml

Contains information about the user directory structure. This information includes security identifiers (SIDs).
X:$WINDOWS.

BT\Sources\Panther\PreGatherPnPList.log

Contains information about the initial capture of devices that are on the system during the downlevel phase.
or
C:$WINDOWS.

BT\Sources\Panther\setupact.log

Contains information about setup actions during the installation.
C:$WINDOWS.

BT\Sources\Panther\setuperr.log

Contains information about setup errors during the installation.
C:$WINDOWS.

BT\Sources\Panther\miglog.xml

Contains information about the user directory structure. This information includes security identifiers (SIDs).
C:$WINDOWS.

BT\Sources\Panther\PreGatherPnPList.log

Contains information about the initial capture of devices that are on the system during the downlevel phase.

You may also see a log file in the X:\WINDOWS directory. The Setupact.log file in this directory contains information about the progress of the initial options that are selected on the Windows installation screen. The Windows installation screen appears when you start the computer by using the Windows installation media. After you select Install now from the Windows installation screen, the Setup.exe file starts, and this log file is no longer used.

Online configuration phase

The online configuration phase (the first boot phase) starts when you receive the following message:

Please wait a moment while Windows prepares to start for the first time.

During this phase, basic hardware support is installed. If it’s an upgrade installation, data and programs are also migrated. The following table lists important log files in this setup phase.

Log file Description
C:\WINDOWS\PANTHER\setupact.log Contains information about setup actions during the installation.
C:\WINDOWS\PANTHER\setuperr.log Contains information about setup errors during the installation.
C:\WINDOWS\PANTHER\miglog.xml Contains information about the user directory structure. This information includes security identifiers (SIDs).
C:\WINDOWS\INF\setupapi.dev.log Contains information about Plug and Play devices and driver installation.
C:\WINDOWS\INF\setupapi.app.log Contains information about application installation.
C:\WINDOWS\Panther\PostGatherPnPList.log Contains information about the capture of devices that are on the system after the online configuration phase.
C:\WINDOWS\Panther\PreGatherPnPList.log Contains information about the initial capture of devices that are on the system during the downlevel phase.

Windows Welcome phase

The Windows Welcome phase includes the following options and events:

  • It provides the options to create user accounts.
  • It provides the option to specify a name for the computer.
  • The Windows System Assessment Tool (Winsat.exe) finishes performance testing to determine the Windows Experience Index rating.

The Windows Welcome phase is the final setup phase before a user signs in. The following table lists important log files in this setup phase.

Log file Description
C:\WINDOWS\PANTHER\setupact.log Contains information about setup actions during the installation.
C:\WINDOWS\PANTHER\setuperr.log Contains information about setup errors during the installation.
C:\WINDOWS\PANTHER\miglog.xml Contains information about the user directory structure. This information includes security identifiers (SIDs).
C:\WINDOWS\INF\setupapi.dev.log Contains information about Plug and Play devices and driver installation.
C:\WINDOWS\INF\setupapi.app.log Contains information about application installation.
C:\WINDOWS\Panther\PostGatherPnPList.log Contains information about the capture of devices that are on the system after the online configuration phase.
C:\WINDOWS\Panther\PreGatherPnPList.log Contains information about the initial capture of devices that are on the system during the downlevel phase.
C:\WINDOWS\Performance\Winsat\winsat.log Contains information about the Windows System Assessment Tool performance testing results.

Rollback phase

If a Windows upgrade installation fails, and you’ve successfully rolled back the installation to the previous operating system desktop, there are several log files that you can use for troubleshooting. The following table lists important log files in this phase.

Управление текущим расположением Managing Current Location

При навигации по системам папок в проводнике у вас обычно есть определенное рабочее расположение, т. е. текущая открытая папка. When navigating folder systems in File Explorer, you usually have a specific working location — namely, the current open folder. Элементами в текущей папке можно легко управлять, щелкая их. Items in the current folder can be manipulated easily by clicking them. Когда в интерфейсе командной строки (например, Cmd.exe) открыта папка, в которой находится определенный файл, вы можете получить к нему доступ, указав короткое имя, а не вводить весь путь к файлу. For command-line interfaces such as Cmd.exe, when you are in the same folder as a particular file, you can access it by specifying a relatively short name, rather than needing to specify the entire path to the file. Текущий каталог называется рабочим. The current directory is called the working directory.

Windows PowerShell использует существительное Location для ссылки на рабочий каталог и реализует семейство командлетов для просмотра расположения и управления им. Windows PowerShell uses the noun Location to refer to the working directory, and implements a family of cmdlets to examine and manipulate your location.

Получение текущего расположения (Get-Location) Getting Your Current Location (Get-Location)

Чтобы определить путь к текущему каталогу, введите команду Get-Location : To determine the path of your current directory location, enter the Get-Location command:

Командлет Get-Location аналогичен команде pwd в оболочке BASH. The Get-Location cmdlet is similar to the pwd command in the BASH shell. Командлет Set-Location аналогичен команде cd в Cmd.exe. The Set-Location cmdlet is similar to the cd command in Cmd.exe.

Настройка текущего расположения (Set-Location) Setting Your Current Location (Set-Location)

Команда Get-Location используется с командой Set-Location . The Get-Location command is used with the Set-Location command. Команда Set-Location позволяет вам указать расположение текущего каталога. The Set-Location command allows you to specify your current directory location.

Обратите внимание, что после ввода команды вы не получите прямого отклика о действии команды. After you enter the command, you will notice that you do not receive any direct feedback about the effect of the command. Большинство команд Windows PowerShell, выполняющих действия, практически не создают выходных данных, так как выходные данные не всегда полезны. Most Windows PowerShell commands that perform an action produce little or no output because the output is not always useful. Чтобы проверить успешность внесения изменения в каталог при вводе команды Set-Location , включите параметр -PassThru при вводе команды Set-Location : To verify that a successful directory change has occurred when you enter the Set-Location command, include the -PassThru parameter when you enter the Set-Location command:

Параметр -PassThru можно использовать с некоторыми командами Set в Windows PowerShell для возврата сведений о результате в случае отсутствия выходных данных по умолчанию. The -PassThru parameter can be used with many Set commands in Windows PowerShell to return information about the result in cases in which there is no default output.

Вы можете указать пути относительно текущего расположения так же, как и в большинстве командных оболочек UNIX и Windows. You can specify paths relative to your current location in the same way as you would in most UNIX and Windows command shells. В стандартной нотации для относительных путей точка ( . ) представляет текущую папку, а две точки ( .. ) — родительский каталог текущего расположения. In standard notation for relative paths, a period ( . )represents your current folder, and a doubled period ( .. ) represents the parent directory of your current location.

Например, если вы находитесь в папке C:\Windows , точка ( . ) представляет C:\Windows , а две точки ( .. ) представляют C: . For example, if you are in the C:\Windows folder, a period ( . )represents C:\Windows and double periods ( .. ) represent C: . Текущее расположение можно изменить на корень диска C: путем ввода следующей команды: You can change from your current location to the root of the C: drive by typing:

Тот же метод работает в дисках Windows PowerShell, которые не являются дисками файловой системы, например HKLM: . The same technique works on Windows PowerShell drives that are not file system drives, such as HKLM: . В реестре в качестве расположения можно задать раздел HKLM\Software путем ввода следующего кода: You can set your location to the HKLM\Software key in the registry by typing:

После этого можно изменить расположение каталога на родительский каталог, который является корнем диска Windows PowerShell HKLM: с помощью относительного пути: You can then change the directory location to the parent directory, which is the root of the Windows PowerShell HKLM: drive, by using a relative path:

Вы можете ввести Set-Location или использовать любой из встроенных псевдонимов Windows PowerShell для Set-Location (cd, chdir, sl). You can type Set-Location or use any of the built-in Windows PowerShell aliases for Set-Location (cd, chdir, sl). Пример: For example:

Сохранение и отзыв последних расположений (Push-Location и Pop-Location) Saving and Recalling Recent Locations (Push-Location and Pop-Location)

При изменении расположения полезно отслеживать свое предыдущее расположение и иметь возможность вернуться к нему. When changing locations, it is helpful to keep track of where you have been and to be able to return to your previous location. Командлет Push-Location в Windows PowerShell создает упорядоченный журнал («стек») путей к каталогам, которые вы открывали, чтобы можно было вернуться на шаг назад по журналу путей к каталогу, используя дополнительный командлет Pop-Location . The Push-Location cmdlet in Windows PowerShell creates a ordered history (a «stack») of directory paths where you have been, and you can step back through the history of directory paths by using the complementary Pop-Location cmdlet.

Например, Windows PowerShell обычно запускается в корневом каталоге пользователя. For example, Windows PowerShell typically starts in the user’s home directory.

Слово стек имеет специальное значение во многих параметрах программирования, включая .NET Framework. The word stack has a special meaning in many programming settings, including .NET Framework. Например, в физическом стеке элементов последний элемент, помещенный в стек, является первым элементом, который можно извлечь из него. Like a physical stack of items, the last item you put onto the stack is the first item that you can pull off the stack. Добавление элемента в стек в разговорной речи называется «проталкиванием» элемента в стек. Adding an item to a stack is colloquially known as «pushing» the item onto the stack. Извлечение элемента из стека в разговорной речи называется «выводом» элемента из стека. Pulling an item off the stack is colloquially known as «popping» the item off the stack.

Чтобы передать текущее расположение в стек, а затем переместить его в папку локальных параметров, введите: To push the current location onto the stack, and then move to the Local Settings folder, type:

После этого можно передать расположение локальных параметров в стек и переместить его в папку Temp, введя следующее: You can then push the Local Settings location onto the stack and move to the Temp folder by typing:

Чтобы убедиться, что каталоги изменены, введите команду Get-Location : You can verify that you changed directories by entering the Get-Location command:

После этого можно перейти в последний открытый каталог, введя команду Pop-Location , и проверить изменение, введя команду Get-Location : You can then pop back into the most recently visited directory by entering the Pop-Location command, and verify the change by entering the Get-Location command:

Как и в случае с командлетом Set-Location , можно включить параметр -PassThru при вводе командлета Pop-Location , чтобы открыть указанный каталог: Just as with the Set-Location cmdlet, you can include the -PassThru parameter when you enter the Pop-Location cmdlet to display the directory that you entered:

Кроме того, можно использовать командлеты расположения с сетевыми путями. You can also use the Location cmdlets with network paths. Если у вас есть сервер FS01 с общей папкой Public, можно изменить расположение, введя If you have a server named FS01 with an share named Public, you can change your location by typing

Для изменения расположения на любой доступный диск можно использовать команды Push-Location и Set-Location . You can use the Push-Location and Set-Location commands to change the location to any available drive. Например, если у вас есть локальный дисковод компакт-дисков с буквой диска D, содержащий компакт-диск с данными, вы можете изменить расположение на дисковод компакт-дисков, введя команду Set-Location D: . For example, if you have a local CD-ROM drive with drive letter D that contains a data CD, you can change the location to the CD drive by entering the Set-Location D: command.

Если дисковод пуст, вы получите следующее сообщение об ошибке: If the drive is empty, you will get the following error message:

В интерфейсе командной строки проводник неудобно использовать для просмотра свободных физических дисков. When you are using a command-line interface, it is not convenient to use File Explorer to examine the available physical drives. Также в проводнике будут показаны не все диски PowerShell. Also, File Explorer would not show you the all of the Windows PowerShell drives. Windows PowerShell предоставляет набор команд для управления дисками Windows PowerShell, о которых речь пойдет далее. Windows PowerShell provides a set of commands for manipulating Windows PowerShell drives, and we will talk about these next.

Читайте также:  Где находятся кусты реестра windows
Оцените статью