Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
programming4us
Windows 7

Configuring Startup and Troubleshooting Startup Issues : Important Startup Files, How to Configure Startup Settings

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
6/7/2013 4:34:19 PM

1. Important Startup Files

For Windows to start, the system and boot partitions must contain the files listed in Table 1.

Table 1. Windows Startup Files

FILE NAME

DISK LOCATION

DESCRIPTION

BootMgr

Root of the system partition

The Windows Boot Manager.

WinLoad

%SystemRoot%\System32

The Windows Boot Loader.

BCD

\Boot

A file that specifies the paths to operating system installations and other information required for Windows to start.

Ntoskrnl.exe

%SystemRoot%\System32

The core (also called the kernel) of the Windows operating system. Code that runs as part of the kernel does so in privileged processor mode and has direct access to system data and hardware.

Hal.dll

%SystemRoot%\System32

The HAL dynamic-link library (DLL) file. The HAL abstracts low-level hardware details from the operating system and provides a common programming interface to devices of the same type (such as video adapters).

Smss.exe

%SystemRoot%\System32

The Session Manager file. Session Manager is a user-mode process created by the kernel during startup. It handles critical startup tasks including creating page files and performing delayed file rename and delete operations.

Csrss.exe

%SystemRoot%\System32

The Win32 Subsystem file. The Win32 Subsystem is started by Session Manager and is required by Windows to function.

Winlogon.exe

%SystemRoot%\System32

The Logon Process file, which handles user logon requests and intercepts the Ctrl+Alt+Delete logon key sequence. The Logon Process is started by Session Manager. This is a required feature.

Services.exe

%SystemRoot%\System32

The Service Control Manager is responsible for starting and stopping services and is a required feature of Windows.

Lsass.exe

%SystemRoot%\System32

The Local Security Authentication Server process is called by the Logon Process when authenticating users and is a required feature.

System registry file

%SystemRoot%\System32\Config\System

The file that contains data used to create the registry key HKEY_LOCAL_MACHINE\SYSTEM. This key contains information that the operating system requires to start devices and system services.

Device drivers

%SystemRoot%\System32\Drivers

Driver files in this folder are for hardware devices, such as keyboard, mouse, and video.

In Table 1, the term %SystemRoot% is one of many environment variables used to associate string values, such as folder or file paths, to variables that Windows applications and services use. For example, by using environment variables, scripts can run without modification on computers that have different configurations. To obtain a list of environment variables that you can use for troubleshooting, type set at the Windows command prompt.

2. How to Configure Startup Settings

Windows Vista and Windows 7 enable administrators to configure startup settings using many of the same graphical tools that Windows XP provides. Command-line tools for configuring startup tools have been replaced with new tools, however, and you can no longer directly edit the startup configuration file (formerly the Boot.ini file). The following sections describe several techniques for configuring startup settings.

How to Use the Startup And Recovery Dialog Box

The simplest way to edit the BCD registry file is to use the Startup And Recovery dialog box. To use the Startup And Recovery dialog box to change the default operating system, follow these steps:

  1. Click Start, right-click Computer, and then click Properties.

  2. Click Advanced System Settings.

  3. In Startup And Recovery, click Settings.

  4. Click the Default Operating System list and then click the operating system that you want to boot by default.

  5. Click OK twice.

The default operating system will automatically load the next time you start the computer.

How to Use the System Configuration Tool

The System Configuration tool offers more advanced control over startup settings, including some ability to configure the BCD registry file. This tool is specifically designed for troubleshooting, and you can use it to easily undo changes that you have made to the computer's configuration (even after restarting the computer). If you make changes with the System Configuration tool, it will remind users logging on that settings have been temporarily changed—thus reducing the likelihood that settings will not be reset after the troubleshooting process has been completed.

Some common tasks for the System Configuration tool include:

  • Temporarily disabling startup applications to isolate the cause of a post-logon problem.

  • Temporarily disabling automatic services to isolate the cause of a pre-logon or post-logon problem.

  • Permanently or temporarily configuring the BCD registry file.

  • Configuring a normal, diagnostic, or selective startup for Windows Vista.

To use the System Configuration tool, click Start, type Msconfig, and then press Enter. The System Configuration tool provides five tabs:

  • General Use this tab to change the next startup mode. Normal Startup loads all device drivers and services. Diagnostic Startup is useful for troubleshooting startup problems, and it loads only basic devices and services. Use Selective Startup to specify whether you want to load system services or startup items.

  • Boot Use this tab to configure the BCD registry file and startup settings. You can remove startup operating system options, set the default operating system, configure advanced settings for an operating system (including number of processors, maximum memory, and debug settings), and configure Windows for Safe Boot or to boot without a graphical interface.

  • Services Use this tab to change the startup settings for a service temporarily. This is an excellent way to determine whether an automatic service is causing startup problems. After you disable a service, restart your computer and determine whether the problem still exists. If it does, you have eliminated one potential cause of the problem. You can then use this tab to re-enable the service, disable another service, and repeat the process. To disable services permanently, use the Services console.

  • Startup Lists applications that are configured to start automatically. This is the best way to disable applications temporarily during troubleshooting because you can easily re-enable them later using the same tool. You should not use the System Configuration tool to permanently remove startup applications, however, because the System Configuration tool is designed to enable you to easily undo changes. Instead, you should manually remove the application.

  • Tools Provides links to other tools that you can start.

Note

The Win.ini, System.ini, and Boot.ini tabs do not appear in the System Configuration tool because those files have not been used since Windows XP.

Because the System Configuration tool is a graphical tool, it is primarily useful when Windows is booting successfully.

How to Use BCDEdit

The BCDEdit command-line tool provides you with almost unlimited control over the BCD registry file and configuration settings.

Note

If you have a computer with both Windows XP and Windows 7 installed and you want to modify the BCD registry file from Windows XP, you can run BCDEdit from Windows XP by starting it directly from the Windows\System32 folder of your Windows 7 installation. Although this might be useful in some multiboot configurations, typically, you should run BCDEdit from the System Recovery command prompt if you cannot load Windows 7.

You must use administrative credentials to run BCDEdit from within Windows 7. To do this, follow these steps:

  1. Click Start, click All Programs, and then click Accessories.

  2. Right-click Command Prompt and then click Run As Administrator.

To view detailed information about using BCDEdit, run BCDEdit /? from a command prompt. The following sections describe how to perform specific tasks with BCDEdit.

How to Interpret BCDEdit Output

You can view settings currently defined in your BCD registry file by using the bcdedit /enum command. Optionally, you can follow the command with one of the following parameters to change which entries are displayed:

  • Active The default setting that is displayed if you run bcdedit /enum without any additional parameters. Displays all entries in the Boot Manager display order.

  • Firmware Displays all firmware applications.

  • Bootapp Displays all boot environment applications.

  • Osloader Displays all operating system entries.

  • Resume Displays all resume from hibernation entries.

  • Inherit Displays all inherit entries.

  • All Displays all entries.

For example, to view the startup entry used to resume from hibernation, run the following command at an administrative command prompt.

bcdedit /enum resume

Similarly, to view all startup entries, use the following command.

bcdedit /enum all

How to Back Up and Restore Settings

Making changes to your BCD registry file can render your computer unbootable. Therefore, before making changes to your BCD registry file, you should make a backup copy, have a bootable Windows DVD available, and be prepared to restore the original BCD registry file.

To make a backup of your current BCD registry, call the BCDEdit /export command, as shown here.

bcdedit /export backupbcd.bcd

Later, you can restore your original BCD registry file by calling the BCDEdit /import command, as shown here.

bcdedit /import backupbcd.bcd

Note

The file name and extension you use are not significant.

How to Change the Default Operating System Entry

To view the current default operating system entry, run the following command and look for the default line.

bcdedit /enum {bootmgr}

Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  partition=\Device\HarddiskVolume1
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
default                 {current}
resumeobject            {24a500f3-12ea-11db-a536-b7db70c06ac2}
displayorder            {current}
toolsdisplayorder       {memdiag}
timeout                 30

To change the default operating system entry, first run the following command to view the existing entries and make note of the identifier for the entry that you want to be the default.

bcdedit /enum

Then run the following command to set a new default (where <id> is the identifier for the new entry).

bcdedit /default <id>

For example, to configure the Windows Boot Manager to start the previous installation of Windows XP by default (which is identified as {ntldr}), run the following command.

bcdedit /default {ntldr}

To configure the currently running instance of Windows 7 as the default, run the following command.

bcdedit /default {current}

How to Change the Boot Menu Time-Out

The boot menu, by default, is displayed for 30 seconds if you have more than one boot menu entry. If you have only one boot menu entry, the menu is not displayed at all (although the Boot Manager does wait several seconds so that you can press a key to view the menu).

To change the time-out for the boot menu, use the bcdedit /timeout seconds command, as shown here.

bcdedit /timeout 15

How to Change the Order of Boot Manager Menu Items

To change the order of Boot Manager menu items, use the bcdedit /display command, and then list the menu item identifiers in the desired sequence, as shown in the following example.

bcdedit /display {current} {ntldr} {cbd971bf-b7b8-4885-951a-fa0344f5d71}

How to Create an Entry for Another Operating System

You can use BCDEdit to create an entry for an operating system other than Windows 7. You may need to add boot entries to the BCD registry file if you want to be able to load different operating systems on a single computer. Although Windows automatically creates boot entries for existing operating systems when installed, you might need to add a boot entry manually if you install another operating system after Windows 7 or if you want to load an operating system from a newly attached hard disk.

By default, the BCD registry file contains an entry called {ntldr} that is configured to start an older version of Windows from your C:\ partition. If you have only one older operating system and Earlier Version Of Windows does not currently appear on the computer's boot menu, you can use this existing entry to start the older operating system. To do this, call BCDEdit /set to configure the boot volume. Then add the entry to the Windows Boot Manager operating system menu by calling the BCDEdit /displayorder command. The following code demonstrates how to do this.

REM Modify the following line to identify the other OS' partition
REM The following line could also be, "bcdedit /set {ntldr} device boot"
bcdedit /set {ntldr} device partition=C:

REM The following line makes the entry bootable by adding it to the menu
bcdedit /displayorder {ntldr} /addlast

You can verify that the new entry will appear on the boot menu by running the command bcdedit /enum ACTIVE and looking for the Windows Legacy OS Loader entry.

If you need to be able to choose from multiple older Windows operating systems, you should choose the {ntldr} entry from the boot menu. The Windows Boot Manager will then pass control to Ntldr, which will display a menu based on the Boot.ini file that you can use to choose from all Windows operating systems.

If you want to create an entry for a non-Microsoft operating system, you can either create an entry using the bcdedit /create command, or you can copy the existing {ntldr} entry and update it for the operating system. To base a new entry on {ntldr}, copy the entry, update the boot loader path, and then add it to the boot menu by running these commands.

bcdedit /copy {ntldr} /d "Other operating system (or other description)"

REM The previous command will display a new GUID that identifies the copy.
REM Use the GUID in the following command, and modify the partition identifier as
needed.
bcdedit /set {NEW-GUID} device partition=C:

Note

Don't retype the GUID by hand—you're likely to make a mistake. Instead, copy it to the Clipboard as follows: Click the command menu in the upper-left corner of the command prompt window, click Edit, and then click Mark. Select the GUID text (including the brackets) and then press Enter on your keyboard. To paste the GUID to the command prompt, click the command menu, click Edit, and then click Paste.

Now run the following command to identify the operating system's boot loader.

REM Replace the last parameter with the boot loader filename
bcdedit /set {NEW-GUID} path \boot-loader

If {ntldr} was not part of the boot menu when you copied it, you also need to run the following command to add the copied entry to the boot menu.

bcdedit /displayorder {NEW-GUID} /addlast

Additionally, you might need to configure the operating system's own boot loader.

How to Remove a Boot Entry

Typically, you do not need to remove entries from the BCD registry file. Instead, you should simply remove entries from the Windows Boot Manager menu. To remove an entry from the menu, first run bcdedit /enum and note the boot entry's identifier. Then run the following command, substituting the identifier.

bcdedit /displayorder {GUID} /remove

For example, to remove the entry to load the previous version of Windows from the boot menu, you would run this command.

bcdedit /displayorder {ntldr} /remove

You can later re-add the entry to the boot menu by calling the following command.

bcdedit /displayorder {GUID} /addlast

To permanently remove an entry from the BCD registry, run the following command.

bcdedit /delete {GUID} /remove

You should permanently remove an entry only if you have removed the operating system files from the computer.

How to View and Update Global Debugger Settings

To view debugger settings for startup entries, run the following command.

bcdedit /enum
bcdedit /dbgsettings DebugType [debugport:Port] [baudrate:Baud]
[channel:Channel] [targetname:TargetName]

Replace the parameters with your custom settings, as described in the following list:

  • DebugType Specifies the type of debugger. DebugType can be SERIAL, 1394, or USB. The remaining options depend on the debugger type selected.

  • Port For SERIAL debugging, specifies the serial port to use as the debugging port.

  • Baud For SERIAL debugging, specifies the baud rate to be used for debugging.

  • Channel For 1394 debugging, specifies the 1394 channel to be used for debugging.

  • Target Name For USB debugging, specifies the USB target name to be used for debugging.

For example, the following command sets the global debugger settings to SERIAL debugging over com1 at 115,200 baud.

bcdedit /dbgsettings serial debugport:1 baudrate:115200

The following command sets the global debugger settings to 1394 debugging using channel 23.

bcdedit /dbgsettings 1394 CHANNEL:32

The following command sets the global debugger settings to USB debugging using target name debugging.

bcdedit /dbgsettings USB targetname:debugging

How to Remove the Windows 7 Boot Loader

If you want to remove Windows 7 from a dual-boot environment that includes Windows XP or an earlier version of Windows, follow these steps:

  1. Use Bootsect.exe to restore the Ntldr.exe program. To do this, type the following command, where D:\ is the drive containing the Windows installation media.

    D:\Boot\Bootsect.exe -NT52 All

    After the computer restarts, it does not load the Windows Boot Manager program. Instead, Ntldr.exe loads and processes the Boot.ini file to start an earlier version of Windows.

  2. If Windows 7 is not installed on the active partition, you can now delete or remove the partition where Windows 7 is installed.

Note

You can follow these steps in any version of Windows. If you follow these steps in Windows Vista or Windows 7, run the commands from a command prompt that has elevated user rights. To do this, click Start, click Accessories, right-click the command prompt shortcut, and then click Run As Administrator.

How to Configure a User Account to Automatically Log On

Requiring users to enter credentials when their computers start is an important part of Windows security. If a user account automatically logs on, anyone who has physical access to the computer can restart it and access the user's files. Nonetheless, in scenarios in which a computer is physically secure, automatic logon might be preferred. To configure a workgroup computer (you cannot perform these steps on a domain member) to automatically log on, follow these steps:

  1. Click Start, type netplwiz, and then press Enter.

  2. In the User Accounts dialog box, click the account you want to automatically log on to. If it is available, clear the Users Must Enter A User Name And Password To Use This Computer check box.

  3. Click OK.

  4. In the Automatically Log On dialog box, enter the user's password twice. Click OK.

The next time you restart the computer, it will automatically log on with the local user account you selected. Configuring automatic logon stores the user's password in the registry unencrypted, where someone might be able to retrieve it.

How to Disable the Windows Startup Sound

By default, Windows plays a sound as part of the startup process. This sound can be useful for troubleshooting startup problems because it indicates whether you have reached a specific startup phase. If you prefer, you can disable the startup sound by following these steps:

  1. Click Start and then click Control Panel.

  2. In Control Panel, click Hardware And Sound.

  3. Click Change System Sounds.

  4. On the Sounds tab, clear the Play Windows Startup Sound check box. Click OK.

How to Speed Up the Startup Process

Although startup is a complex process and the time required varies from computer to computer, you can often reduce the startup time. To optimize settings that might improve startup time, follow these steps:

  1. In the computer's BIOS settings, set the computer to boot first from the Windows boot drive. If you need to boot from removable media in the future, you will first need to change this setting.

  2. In the computer's BIOS settings, enable Fast Boot, if available, to disable time-consuming and often unnecessary hardware checks.

  3. If you have more than one boot menu item, reduce the boot menu time-out value using the Boot tab of the Msconfig tool. Alternatively, you can use BCDEdit to reduce the time-out value.

  4. Clear disk space if free disk space is below 15 percent and then defragment the hard disk. Although defragmentation happens automatically by default, defragmentation is less effective if free disk space is low.

  5. Disable unnecessary hardware using Windows Device Manager.

  6. Use Windows ReadyBoost, to cache some files used in the startup process to a USB flash drive.

  7. Remove unnecessary startup applications.

  8. For services (other than those included with Windows) that need to start automatically but do not need to start immediately, use the Services console to change the startup type to Automatic (Delayed Start). If services are set to start automatically but are not required, change the startup type to Manual. 

For detailed startup performance troubleshooting, examine the Applications And Services Logs\Microsoft\Windows\Diagnostics-Performance\Operational Event Log. Events with IDs from 100 to 199 provide startup performance detail in the event of long startup times. In particular, event ID 100 indicates the startup time in milliseconds. Other events identify applications or services that are causing a startup performance degradation.

Other -----------------
- Managing Windows 7 : Managing Navigational and Editing Flicks
- Managing Windows 7 : Configuring a Pen or Touch Computer, Managing Pen Settings
- Configuring Startup and Troubleshooting Startup Issues : Understanding the Startup Process
- Configuring Startup and Troubleshooting Startup Issues : What's New with Windows Startup
- Windows 7 Mobility Features : Using Windows 7 with a Netbook
- Windows 7 Mobility Features : Other Mobile Features
- Windows 7 Mobility Features : Presentations A-Go-Go
- Windows 7 Mobility Features : Windows Mobility Center
- Evaluating Applications for Windows 7 Compatibility : The Application Compatibility Toolkit (part 4) - Resolving Application Compatibility Issues with Shims
- Evaluating Applications for Windows 7 Compatibility : The Application Compatibility Toolkit (part 3) - Using the Application Compatibility Manager
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server