ATTRIB
Use the attrib command together with one or more of the following parameters to change the attributes of a file or a folder:
-R
+R
-S
+S
-H
+H
-C
+C
Notes
+ Sets an attribute
- Resets an attribute
R Read-only file attribute
S System file attribute
H Hidden file attribute
C Compressed file attribute
You must set or clear at least one attribute.To view attributes, use the dir command.
BATCH
Use this command to run commands that are specified in a text file. In the command syntax, inputfile specifies the text file that contains the list of commands to be run, and outputfile specifies the file that contains the output of the specified commands. If you do not specify an output file, the output appears on the screen.
BOOTCFG
Use this command for boot configuration and recovery. This command has the following options:
bootcfg /add
bootcfg /rebuild
bootcfg /scan
bootcfg /list
bootcfg /disableredirect
bootcfg /redirect [portbaudrate] | [useBiosSettings]
Examples:
bootcfg /redirect com1 115200
bootcfg /redirect useBiosSettings
You can use the following options:
/add Adds a Windows installation to the boot menu list.
/rebuild Iterates through all Windows installations so that you can specify which installations to add.
/scan Scans all disks for Windows installations and displays the results so that you can specify which installations to add.
/default Sets the default boot entry.
/list Lists the entries already in the boot menu list.
/disableredirect Disables redirection in the boot loader.
/redirect Enables redirection in the boot loader, with the specified configuration.
CD and CHDIR
Use the cd and chdir commands to change to a different folder. For example, you can use the following commands:
Type cd .. to change to the parent folder.
Type cd drive: to display the current folder in the specified drive.
Type cd without parameters to display the current drive and folder.
The chdir command treats spaces as delimiters. Because of this, you must put quotation marks ("") around a folder name that contains a space.
The following is an example:
cd "\windows\profiles\username\programs\start menu"
The chdir command works only in the system folders of the current installation of Windows, in removable media, in the root folder of any hard disk partition, or in the local installation sources.
CHKDSK
chkdsk drive /p /r
The chkdsk command checks the specified drive and repairs or recovers the drive if the drive requires it. The command also marks any bad sectors and it recovers readable information.
You can use the following options:
/p Does an exhaustive check of the drive and corrects any errors.
/r Locates bad sectors and recovers readable information.
Note If you specify the /r option, the /p option is implied. When you specify the chkdsk command without arguments, the command checks the current drive with no options in effect.
When you run the chkdsk command, you must use the Autochk.exe file. CHKDSK automatically locates this file in the startup folder. If the Command Console was preinstalled, the startup folder is typically the Cmdcons folder. If CHKDSK cannot find Autochk.exe in the startup folder, CHKDSK tries to locate the Windows installation disc. If it cannot find the installation media, CHKDSK prompts you for the location of the Autochk.exe file.
CLS
Use this command to clear the screen.
COPY
copy source destination
Use this command to copy a file. In the command syntax, source specifies the file to copy and destination specifies the folder or file name for the new file. You cannot use wildcard characters indicated by an asterisk (*), and you cannot copy a folder. If you copy a compressed file from the Windows installation disc, the file is automatically decompressed while it is copied.
The source of the file can be removable media, any folder in the system folders of the current Windows installation, the root of any drive, the local installation sources, or the Cmdcons folder.
If destination is unspecified, the default destination is the current folder. If the file already exists, you are prompted whether you want the copied file to overwrite the existing file. The destination cannot be removable media.
DEL and DELETE
del drive: path filename
delete drive: path filename
Use this command to delete a file. In the command syntax, drive: path filename specifies the file that you want to delete. The delete command works only in the system folders of the current Windows installation, in removable media, in the root folder of any hard disk partition, or in the local installation sources. The delete command does not accept wildcard characters.
DIR
dir drive: path filename
Use this command to display a list of files and subfolders in a folder. In the command syntax, drive: path filename specifies the drive, folder, and files to list. The dir command lists all files, including hidden files and system files. Files can have the following attributes:
D Directory
H Hidden file
S System file
E Encrypted
R Read-only file
A Files ready for archiving
C Compressed
P Reparse point
The dir command works only in the system folders of the current Windows installation, in removable media, in the root folder of any hard disk partition, or in the local installation sources.
DISABLE
disable servicename
Use this command to disable a Windows system service or a driver. In the command syntax, servicename specifies the name of the service or driver that you want to disable.
Use the listsvc command to display all services or drivers that are eligible to be disabled. The disable command prints the old start type of the service before resetting the start type to SERVICE_DISABLED. Record the old start type if you must enable the service again.
The disable command displays the following start_type values:
SERVICE_DISABLED
SERVICE_BOOT_START
SERVICE_SYSTEM_START
SERVICE_AUTO_START
SERVICE_DEMAND_START
DISKPART
diskpart /add/deletedevice_name drive_name partition_name size
Use this command to manage the partitions on your hard disk volumes. You can use the following options:
/add Creates a new partition.
/delete Deletes an existing partition.
device_name The name of the device that is used to create a new partition.
drive_name A drive-letter-based name, for example D:.
partition_name The partition-based name for deleting an existing partition.
size The size of the new partition in megabytes.
You can determine the device name from the output of the MAP command, for example, \Device\HardDisk0. You can use the partition name instead of the drive name argument, for example, \Device\HardDisk0\Partition1. If you use no arguments, a user interface for managing your partitions appears.
ENABLE
enable servicename start_type
You can use the enable command to enable a Windows system service or a driver.
LISTSVC
Use the listsvc command to display all eligible services or drivers to enable. The enable command prints the old start type of the service before it is reset to the new value. It is a good idea to note the old value, in case you have to restore the start type of the service.
Valid options for start_type are as follows:
SERVICE_BOOT_START
SERVICE_SYSTEM_START
SERVICE_AUTO_START
SERVICE_DEMAND_START
If you do not specify a new start type, the enable command prints the old start type for you.
EXIT
Use the exit command to exit the Recovery Console and restart your computer.
EXPAND
expand source [/F:filespec] [destination] [/y]
expand source [/F:filespec] /D
Use this command to expand a file. In the command syntax, source specifies the name of the file to be expanded and destination specifies the folder for the new file. If you do not specify a destination, the command uses the current folder by default. You cannot include wildcard characters.
You can use the following options:
/y Do not prompt before overwriting an existing file.
/f:filespec Identifies the files to be expanded.
/d Do not expand; display only a directory of the files in the source.
If the source contains more than one file, you must use the /f:filespec parameter to find the specific files to be expanded. You can include wildcard characters.
The destination can be any folder in the system folders of the current Windows installation, in the root of the drive, in the local installation sources, or in the Cmdcons folder. The destination cannot be removable media, and the destination file cannot be read-only. Use the attrib command to remove the read-only attribute.
Unless you use the /y option, the expand command prompts you if the destination file already exists.
FIXBOOT
fixboot drive name:
Use this command to write the new Windows boot sector code on the system partition. In the command syntax, drive name is the drive letter where the boot sector will be written. This command fixes damage in the Windows boot sector. This command overrides the default setting, which writes to the system boot partition. The fixboot command is supported only on x86-based computers.
FIXMBR
fixmbr device name
Use this command to repair the MBR of the boot partition. In the command syntax, device name is an optional device name that specifies the device that requires a new MBR. Use this command if a virus has damaged the MBR and Windows cannot start.
Warning This command can damage your partition tables if a virus is present or if a hardware problem exists. If you use this command, you may create inaccessible partitions. We recommend that you run antivirus software before you use this command.
You can obtain the device name from the output of the map command. If you do not specify a device name, the MBR of the boot device is repaired,
for example:
fixmbr \device\harddisk2
If the fixmbr command detects an invalid or non-standard partition table signature, fixmbr command prompts you for permission before it rewrites the MBR. The fixmbr command is supported only on x86-based computers.
FORMAT
format drive: /Q /FS:file-system
Use this command to format the specified drive to the specified file system. In the command syntax, /Q performs a quick format of the drive, drive is the drive letter of the partition to format, and /FS:file-system specifies the type of file system to use such as FAT, FAT32, or NTFS. If you do not specify a file system, the existing file system format is used if it is available.
LOGON
The logon command lists all detected installations of Windows and then requests the local administrator password for the copy of Windows that you want to log on to. If your first three tries to log on fail, the console closes, and your computer restarts.
MAP
map arc
Use this command to list drive letters, file system types, partition sizes, and mappings to physical devices. In the command syntax, the arc parameter tells the map command to use ARC paths instead of Windows Device paths.
MD and MKDIR
The md and mkdir commands create new folders. Wildcard characters are not supported. The mkdir command works only in the system folders of the current installation of Windows, in removable media, in the root folder of any hard disk partition, or in the local installation sources.
MORE
more filename
Use this command to display a text file to the screen.
NET
Although the Help file states otherwise, the net command is not usable from the Recovery Console. The protocols stack is not loaded for the Recovery Console. Therefore, there is no networking function available.
RD and RMDIR
Use rd and rmdir commands to delete a folder. These commands work only in the system folders of the current Windows installation, in removable media, in the root folder of any hard disk partition, or in the local installation sources.
REN and RENAME
Use the ren and rename commands to rename a file.
Note You cannot specify a new drive or path for the renamed file. These commands work only in the system folders of the current Windows installation, in removable media, in the root folder of any hard disk partition, or in the local installation sources.
SET
You can use the set to display or modify four environment options.
AllowWildCards = FALSE AllowAllPaths = FALSE AllowRemovableMedia = FALSE NoCopyPrompt = FALSE
For more information about how to use the set command, click the following article number to view the article in the Microsoft Knowledge Base:
235364 (http://support.microsoft.com/kb/235364/ ) Description of the SET command in Recovery Console
SYSTEMROOT
The systemroot command sets the current working folder to the %SystemRoot% folder of the Windows installation that you are currently logged on to.
TYPE
type filename
Use the type command to display a text file.
Welcome to NSTECH blog, this site provides free IT Support for everyone, providing you informations about virus guards, system repair, system recover, tips and tricks, registry tweaks and more.
Thursday, July 16, 2009
overview of recovery console
When you use the Windows Recovery Console you can perform the following actions.
Use, copy, rename, or replace operating system files and folders ,
Enable or disable service or device startup the next time that you start your computer ,Repair the file system boot sector or the master boot record (MBR)
Create and format partitions on drives.You must be logged on as an administrator or a member of the Administrators group in order to run the computer in Recovery Console.Only an administrator can obtain access to the Windows Recovery Console. This prevents unauthorized users from using any NTFS volume.
Restrictions and limitations of the Recovery Console
When you use the Windows Recovery Console, you can use only the following items.
Reminder - If you use an incorrect password three times in Recovery console, the Windows Recovery Console closes. Also, if the Security Accounts Manager (SAM) database is missing or damaged, you cannot use the Windows Recovery Console because you cannot be authenticated correctly. After you enter your password and the Windows Recovery Console starts, type Exit to restart the computer.When you use Windows XP Professional, you can set group policies to enable automatic administrative logon.
Available commands within Windows Recovery Console
The following commands are available within the Windows Recovery Console.The commands are not case-sensitive.please keep in mind that Some of these commands can make your system inoperable. Read the whole explanation of any command before you enter it onto the command line.
commands are
Use, copy, rename, or replace operating system files and folders ,
Enable or disable service or device startup the next time that you start your computer ,Repair the file system boot sector or the master boot record (MBR)
Create and format partitions on drives.You must be logged on as an administrator or a member of the Administrators group in order to run the computer in Recovery Console.Only an administrator can obtain access to the Windows Recovery Console. This prevents unauthorized users from using any NTFS volume.
Restrictions and limitations of the Recovery Console
When you use the Windows Recovery Console, you can use only the following items.
- The root folder
- The %SystemRoot% folder and the subfolders of the Windows installation that you are currently logged on to
- The Cmdcons folder
- The removable media drives such as the CD drive or the DVD drive
Reminder - If you use an incorrect password three times in Recovery console, the Windows Recovery Console closes. Also, if the Security Accounts Manager (SAM) database is missing or damaged, you cannot use the Windows Recovery Console because you cannot be authenticated correctly. After you enter your password and the Windows Recovery Console starts, type Exit to restart the computer.When you use Windows XP Professional, you can set group policies to enable automatic administrative logon.
Available commands within Windows Recovery Console
The following commands are available within the Windows Recovery Console.The commands are not case-sensitive.please keep in mind that Some of these commands can make your system inoperable. Read the whole explanation of any command before you enter it onto the command line.
commands are
- attrib
- batch
- bootcfg
- cd
- chdir
- chkdsk
- cls
- copy
- del
- delete
- dir
- disable
- diskpart
- enable
- exit
- expand
- fixboot
- fixmbr
- format
- help
- listsvc
- logon
- md
- more
- mkdir
- more
- map
- net
- rd
- ren
- rmdir
- rename
- set
- systemroot
- type
Start Recovery Console from the Windows XP CD-ROM
If you have not preinstalled the Windows Recovery Console, you can start the computer and use the Recovery Console directly from your original Windows XP installation disc.to start recovery console from CD follow these steps.
- Insert the Windows XP CD into your CD drive and restart your computer. If you are prompted, select any options required to start (boot) from the CD.
- When the text-based part of Setup begins, follow the prompts. Select the repair or recover option by pressing R.
- If you have a dual-boot or multiboot system, select the installation that you want to access from the Recovery Console.
- When you are prompted, type the Administrator password.
- At the command prompt, type Recovery Console commands, you want to use.
- At any time, you can type Help for a list of available commands.
- At any time, you can type Help command name for help on a specific command. For example, you can type help attrib to display the help on the attributes command.
- At any time, you can exit Windows Recovery Console by typing Exit at the command line.
how to install recovery console in windows xp
If your computer starts Windows, you can add the Windows XP Recovery Console as a startup option from the Windows environment. To install the Recovery Console as a startup option, follow these steps:
- login to the windows
- insert the Windows CD into your CD drive
- Click Start and click Run
- Type the following command
- X:\i386\winnt32.exe /cmdcons (where X: is the CD Drive letter), and then press ENTER on your keyboard. Note - There is a space before /cmdcons
- Click OK and follow the instructions to finish Setup. Note - This adds the Windows Recovery Console to the Windows Startup folder.
- Restart your computer and select the Recovery Console option from the list of available operating systems.
how to Configure automatic administrator logon for Recovery Console
To set an automatic administrator logon for the Recovery Console, complete the following steps.please note that you must have administrator privilege in order to complete these task.
After completion of this process the registry key of
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Setup\RecoveryConsole , DWORD value data is set to 1
- First Login as an Administrator
- Go to the Control Panel (Click Start, and then click Control Panel)
- Click Switch to Classic View in the right pane, double-click Administrative Tools, and then double-click Local Security Policy
- Expand Security Settings, expand Local Policies, and then click Security Options
- Double-click the Recovery Console: Allow automatic administrative logon policy, and then set it to Enable
After completion of this process the registry key of
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Setup\RecoveryConsole , DWORD value data is set to 1
Tuesday, July 14, 2009
testing a TCP/IP configuration
after configuring TCP/IP and restarting the computer, you should use ipconfig and ping command prompts tools to test the configuration and connections to other TCP/IP hosts and networks. such testing helps ensure that TCP/IP is functioning properly.
using ipconfig
you use the ipconfig tool to verify the TCP/IP configuration parameters on a host. this helps to determine whether the configuration is initialized or if a duplicate IP address exists. use the ipconfig tool with the /all switch to verify configuration information.
using ping
the ping tool is a diagnose tool that you can use to test TCP/IP configurations and diagnose connection failures. after you have verified the TCP/IP configuration, use the ping tool to determine whether a particular TCP/IP host is available and funtional. to test connectivity use the ping tool with the following syntax in command prompt:
using ipconfig
you use the ipconfig tool to verify the TCP/IP configuration parameters on a host. this helps to determine whether the configuration is initialized or if a duplicate IP address exists. use the ipconfig tool with the /all switch to verify configuration information.
using ping
the ping tool is a diagnose tool that you can use to test TCP/IP configurations and diagnose connection failures. after you have verified the TCP/IP configuration, use the ping tool to determine whether a particular TCP/IP host is available and funtional. to test connectivity use the ping tool with the following syntax in command prompt:
- first go to the command prompt.
- then type ipconfig or ipconfig /all and press enter.
- then type ping 127.0.0.1 (loopback address) to check loopback working properly.
- then use ping ip address of the computer (eg: ping 192.168.0.10) to check NIC (network interface card) working properly.
- then use ping command to ip address of default gateway (router) to check connectivity to gateway.
- then use ping address of the remote host (this can be pc in the network or internet) to check network working properly.
using automatic private ip addressing (APIPA)
the windows xp professional implementation of TCP/IP supports automatic assignment of IP address for simple LAN -based network configurations. this addressing mechanism is an extension of dynamic IP address assignment for LAN adaptors, enabling configuration of IP address without using static IP address assignment or installing the DCHP service. automatic private IP addressing is enabled by default in windows xp professional so that home users and small business users can create a funtioning, single subnet, TCP/IP based network without having to configure the TCP/IP protocol manually or set up a DHCP server.
the process for the automatic private IP addressing feature
the process for the automatic private IP addressing feature
- windows xp professional TCP/IP attempts to find a DHCP server on the attached network to obtain a dynamically assigned IP adrress.
- in the absence of a DHCP server during startup (for example, if the server is down for maintanance or repairs) the client cannot obtain an IP address.
- automatic private IP addressing generates an IP address in the form of 169.254.x.y (where x.y is the client,s unique identifier) and a subnet mask of 255.255.0.0 .
obtaining an ip address automatically
if a server running the DHCP service is available on the network, it can automatically assign TCP/IP configuration information to the DCHP client, you can configure any clients running windows xp professional, windows 95, and windows 98 to obtain TCP/IP configuration information automatically from the DHCP service. this can simplify administration and ensure correct configuration information.
you can use the DHCP service to provide clients with TCP/IP configuration information automatically. however you must configure a computer as a DHCP client before it can interact with the DHCP service.
you can use the DHCP service to provide clients with TCP/IP configuration information automatically. however you must configure a computer as a DHCP client before it can interact with the DHCP service.
using a static IP address
by default client computers, for example those running windows xp professional, windows 2000, windows ME, windows NT, microsoft windows 98, or microsoft windows 95 obtain TCP/IP configuration information automatically from the DHCP service. however even in DHCP enabled environment you should assign a static IP address to selected network computers. for example, the computer running DHCP service cannot be a DHCP client, so it must have a static IP address. if the DHCP service is not available you can also configure TCP/IP to use static IP address. for each network adaptor card that uses TCP/IP in a computer, you can configure an IP address, subnet mask and default gateway.
understanding ip addresses
each IP address consists of a network ID and a host ID. the network ID, also known as the network address, identifies the systems that are located on the same physical network. all computers in the same physical network must have the same network ID, and the network ID must be unique to the internetwork. the host ID, also known as the host address, identifies each TCP/IP host within a network.
IP addresses are logical 32-bit numbers that are broken down into four 8 bit fields known as octets. microsoft TCP/IP supports class A, B and C addresses. the class addresses define which bits are used for network ID and which bits are used for the host ID.
Class A
the first network ID is 1.0.0.0 and the last is 126.0.0.0 , this allows for 126 networks and 16,777,214 hosts per network. the class A adress 127.x.x.x is reserved for loopback testing and interprocess communications on the local computer. for class A addresses, the network ID is laways the first octet in the address and the host ID is the last three octets.
Class B
the first network ID is 128.0.0.0 and the last is 191.255.0.0 , this allows for 16,384 networks and 65,534 hosts per network. for class B addresses the network ID is always the first two octets in the address and host ID is the last two octets.
Class C
the first network ID is 192.0.0.0 and the last is 223.255.255.0 , this allows for 2,097,152 networks and 254 hosts per network. for class C addresses, the network ID is always the first three octets in the address and the host ID is the last octet.
options for configuring a static TCP/IP address
IP address - a logical 32-bit address that identifies a TCP/IP host. each network adpter card in a computer running TCP/IP require a unique IP address, such as 192.168.0.108 , each address has two parts: a network ID, which identifies all hosts on the same physical network, and a host ID which identifies a host on the network. in this example the network ID is 192.168.0 and the host ID is 108.
subnet mask - subnets divide a large network into multiple physical networks connected with routers.a subnet mask blocks out part of the IP address so that TCP/IP can distinguish the network ID from the host ID. when TCP/IP hosts try to communicate, the subnet mask determine whether the destination host is on a local or remote network. to communicate on a local network, computers must have the same subnet mask.
default gateway - the intermediate device on a local network that stores network ID,s of other networks in the enterprise or internet. to communicate with a host on another network, configure an IP address for the default gateway. TCP/IP sends packets for remote networks to the default gateway (if no other route is configured) which then forwards the packets to other gateways until the packet is delivered to a gateway connected to specified destination.
IP addresses are logical 32-bit numbers that are broken down into four 8 bit fields known as octets. microsoft TCP/IP supports class A, B and C addresses. the class addresses define which bits are used for network ID and which bits are used for the host ID.
Class A
the first network ID is 1.0.0.0 and the last is 126.0.0.0 , this allows for 126 networks and 16,777,214 hosts per network. the class A adress 127.x.x.x is reserved for loopback testing and interprocess communications on the local computer. for class A addresses, the network ID is laways the first octet in the address and the host ID is the last three octets.
Class B
the first network ID is 128.0.0.0 and the last is 191.255.0.0 , this allows for 16,384 networks and 65,534 hosts per network. for class B addresses the network ID is always the first two octets in the address and host ID is the last two octets.
Class C
the first network ID is 192.0.0.0 and the last is 223.255.255.0 , this allows for 2,097,152 networks and 254 hosts per network. for class C addresses, the network ID is always the first three octets in the address and the host ID is the last octet.
options for configuring a static TCP/IP address
IP address - a logical 32-bit address that identifies a TCP/IP host. each network adpter card in a computer running TCP/IP require a unique IP address, such as 192.168.0.108 , each address has two parts: a network ID, which identifies all hosts on the same physical network, and a host ID which identifies a host on the network. in this example the network ID is 192.168.0 and the host ID is 108.
subnet mask - subnets divide a large network into multiple physical networks connected with routers.a subnet mask blocks out part of the IP address so that TCP/IP can distinguish the network ID from the host ID. when TCP/IP hosts try to communicate, the subnet mask determine whether the destination host is on a local or remote network. to communicate on a local network, computers must have the same subnet mask.
default gateway - the intermediate device on a local network that stores network ID,s of other networks in the enterprise or internet. to communicate with a host on another network, configure an IP address for the default gateway. TCP/IP sends packets for remote networks to the default gateway (if no other route is configured) which then forwards the packets to other gateways until the packet is delivered to a gateway connected to specified destination.
Subscribe to:
Posts (Atom)