OS Win XP reference

kms

Inactive User
Joined
Sep 14, 2004
Messages
1,204
Reaction score
9
Location
NW London
Here's something useful that I came across on my travels...

Opening Ports or Adding Allowed Programs with SP2's Firewall

1.Click on Start / Run
2.Enter in firewall.cpl
3.Click on the Exceptions tab

Adding a Port for Internet Access:
1.Click on the Add Port button
2.Name it whatever you want
3.Enter in the ports you want to open

Adding a Program for Internet Access
1.Click on Add Program... button
2.A list of all installed programs will be displayed
3.Highlight the one you want to include for Internet access
4.Click on the OK button

Autoexec.nt or Config.nt Errors

If you are getting errors similar to:
The system file is not suitable for running MS-DOS and Microsoft Windows applications. Choose 'Close' to terminate the application.
Try copying the file from \windows\repair directory to the one that is in the \windows\system32 directory.


Common Control Panel Applets

The follow are some common Control Panel Applets that are located in the \windows\system32 directory.
If you find yourself using any of these frequently, then you can simply make shortcuts to them on your desktop.

appwiz.cpl >>Add/Remove Programs
desk.cpl >> Display Properties
firewall.cpl >> Firewall Settings
inetcpl.cpl >> Internet Options
mmsys.cpl >> Sound and Audio
ncpa.cpl >> Network Connections
nusrmgr.cpl >> User Accounts
powercfg.cpl >> Power Options
sysdm.cpl >>System Properties
wscui.cpl >> Security Center
wuaucpl.cpl >> Automatic Updates Configuration


Windows Explorer Opens Search Companion Rather than the Folder
If the Windows Explorer opens up the Search Companion rather than opening up the actual folder, the default setting for opening a folder is changed.

To correct this:
Start Regedit
Go to HKEY_CLASSES_ROOT \ Directory \ shell
Edit the default value to be explorer or none


Guest Only Network Access

If you try and connect to an XP computer and are shown a logins screen with only the computername/Guest,
You may need to change one of the Local Security Policies:
Got to Control Panel - Administrative Tools
Go to Local Policies - Security Options
Check teh Network access: Sharing and security model for local accounts
Set it to Classic - local users authenticate as themselves


Hiding a XP Computer from Network Neighborhood

If you want to share files from a XP computer,
yet want to remove it from showing up in the Network Neighborhood,
Run net config server /hidden:yes


Easy Way to Share Multiple Folders

If you need to share multiple folders, running the program SHRPUBW.EXE will bring up a simple dialog box to let you:
Browse to the folder you want to share
Enter in a Share name
Ender in a Share description
Set permissions. Several choices are available
Restart the process from within the same program


Not Viewing Zip Files as Folders

If you want to turn of WindowsXP showing Zip files as folders,
just run:
regsvr32 /u zipfldr.dll


Setting Capslock, Numlock, Scroll Lock

If you want to set the startup state for any or all of these keys,
you just need to edit the registry.
Start Regedit
Go to HKEY_CURRENT_USER \ Control Panel \ Keyboard
Open InitialKeyboardIndicators
Change the value to one of the following numbers
0 - All Keys off
1 - Caps Lock on
2 - Num Lock on
4 - Scroll Lock on
For multiple keys, add their values:
3 - Caps Lock and Num Lock on
5 - Caps Lock and Scroll Lock on
6 - Num Lock and Scroll Lock on
7 - Caps Lock, Num Lock, and Scroll Lock on
Log off and back on again


Restoring Desktop Icon to the Quicklaunch Bar

If you mistakenly deleted the icon for the Desktop on the Quicklaunch toolbar
Go to C:\Documents and Settings\user_name\Application Data\Microsoft\Internet Explorer\Quick Launch
(where user_name is replaced by your login name)
Create a Text file called ShowDesktop.SCF with the following contents:
[Shell]
Command=2
IconFile=explorer.exe,3
[Taskbar]
Command=ToggleDesktop


Network Access After Norton Anti-Virus Install

Sometimes you can't access a WinXP computer after installing Norton Anti-Virus.
There might be a variety of errors at the other computer depending on the operating system.
On the XP computer, in the Event Viewer / System log, there will be the following error:
The server's configuration parameter "irpstacksize" is too small for the server to use a local device.
Start Regedit
Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters
Edit the IRPStackSize
Give it a value of 15
Reboot the computer


Configure for Auto-Logon

If you are the only person using the computer and what to have it automatically log you on,
Start / Run / "control userpasswords2" - no quotes
Uncheck User must enter a user name and password to use this computer
Services You Can Disable
There are quite a few services you can disable from starting automatically.
This would be to speed up your boot time and free resources.
They are only suggestions so I suggestion you read the description of each one when you run Services
and that you turn them off one at a time.
Some possibilities are:
Alerter - Sends alert messages to specified users that are connected to the server computer.
Application Management - Allows software to tap directly into the Add/Remove Programs feature via the Windows Installer technology.
Background Intelligent Transfer Service - The Background Intelligent Transfer service is used by programs (such as Windows AutoUpdate) to download files by using spare bandwidth.
Clipbook - ClipBook permits you to cut and paste text and graphics over the network.
Error Reporting Service - Allows applications to send error reports to Microsoft in the event of an application fault.
Fast User Switching - Windows XP allows users to switch quickly between accounts, without requiring them to log off.
Help and Support - Allows the XP Built-in Help and Support Center to run.
IMAPI CD-Burning COM Service - You don't need this if you have other software to create CDs.
Indexing Service - Indexes contents and properties of files on local and remote computers; provides rapid access to files through flexible querying language.
IP SEC - Manages IP security policy and starts the ISAKMP/Oakley (IKE) and the IP security driver. If you are not on a domain, you likely don't need this running.
Messenger - Transmits net send and Alerter service messages between clients and servers. This is how a lot of pop-up windows start appearing on your desktop.
Net Logon - Supports pass-through authentication of account logon events for computers in a domain. If you are not on a domain, you don't need this running
Network DDE - Provides network transport and security for Dynamic Data Exchange (DDE) for programs running on the same computer or on different computers.
NT LM Security Support Provider - Provides security to remote procedure call (RPC) programs that use transports other than named pipes.
Performance Logs and Alerts - Collects performance data from local or remote computers based on preconfigured schedule parameters, then writes the data to a log or triggers an alert. If you don't need to monitor your performance logs, then you don't need this service.
Portable Media Serial Number - Retrieves the serial number of any portable music player connected to your computer
QOS RSVP - Provides network signaling and local traffic control setup functionality for QoS-aware programs and control applets.
Remote Desktop Help Session Manager - Manages and controls Remote Assistance. If you are not using Remote Desktop you don't need this service.
Remote Registry - Enables remote users to modify registry settings on this computer.
Routing & Remote Access - Offers routing services to businesses in local area and wide area network environments. Allows dial-in access.
Secondary Login - Enables starting processes under alternate credentials. This is what allows you to run an application as another user.
Smart Card - Manages access to smart cards read by this computer.
Smart Card Helper - Enables support for legacy non-plug and play smart-card readers used by this computer.
SSDP Discovery Service - Enables discovery of UPnP devices on your home network.
TCP/IP NetBIOS Helper - Enables support for NetBIOS over TCP/IP (NetBT) service and NetBIOS name resolution. This should not be needed in today's network environment.
Telnet - Enables a remote user to log on to this computer and run programs, and supports various TCP/IP Telnet clients.
Uninterruptible Power Supply Service - Manages an uninterruptible power supply (UPS) connected to the computer.
Universal Plug and Play Device Host - Provides support to host Universal Plug and Play devices
Upload Manager - Manages synchronous and asynchronous file transfers between clients and servers on the network.
Volume Shadow Copy Service - Manages and implements Volume Shadow Copies used for backup and other purposes.
Web Client - Enables Windows-based programs to create, access, and modify non-local files across the Internet.
Wireless Zero Configuration - Provides automatic configuration for the 802.11 adapters
WMI Performance Adapter - Provides performance library information from WMI HiPerf providers.


Cleaning the Prefetch Directory

WindowsXP has a new feature called Prefetch. This keeps a shortcut to recently used programs.
However it can fill up with old and obsolete programs.
To clean this periodically go to:
Star / Run / Prefetch
Press Ctrl-A to highlight all the shorcuts
Delete them
 
Last edited by a moderator:
and to continue...

Not Displaying Logon, Logoff, Startup and Shutdown Status Messages

To turn these off:
Start Regedit
Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system
If it is not already there, create a DWORD value named DisableStatusMessages
Give it a value of 1


Repair Install

If XP is corrupted to the point where none of the previous solutions get it to boot,
you can do a Repair Install that might work as well as keep the current settings.
Make sure you have your valid WindowsXP key.
The whole process takes about half an hour depending on your computer
If you are being prompted for the administrator's password, you need to choose the 2nd repair option, not the first.
Insert and boot from your WindowsXP CD
At the second R=Repair option, press the R key
This will start the repair
Press F8 for I Agree at the Licensing Agreement
Press R when the directory where WindowsXP is installed is shown. Typically this is C:\WINDOWS
It will then check the C: drive and start copying files
It will automatically reboot when needed. Keep the CD in the drive.
You will then see the graphic part of the repair that is like during a normal install of XP (Collecting Information, Dynamic Update, Preparing Installation, Installing Windows, Finalizing Installation)
When prompted, click on the Next button
When prompted, enter your XP key
Normally you will want to keep the same Workgroup or Domain name
The computer will reboot
Then you will have the same screens as a normal XP Install
Activate if you want (usually a good idea)
Register if you want (but not necessary)
Finish
At this point you should be able to log in with any existing accounts.



NTOSKRNL Missing or Corrupt

If you get an error that NTOSKRNL not found:
Insert and boot from your WindowsXP CD.
At the first R=Repair option, press the R key
Press the number that corresponds to the correct location for the installation of Windows you want to repair.
Typically this will be #1
Change to the drive that has the CD ROM.
CD i386
expand ntkrnlmp.ex_ C:\Windows\System32\ntoskrnl.exe
If WindowsXP is installed in a different location, just make the necessary change to C:\Windows
Take out the CD ROM and type exit


HAL.DLL Missing or Corrupt

If you get an error regarding a missing or corrupt hal.dll file, it might simply be the BOOT.INI file on the root of the C: drive that is misconfigured
Insert and boot from your WindowsXP CD.
At the first R=Repair option, press the R key
Press the number that corresponds to the correct location for the installation of Windows you want to repair.
Typically this will be #1
Type bootcfg /list to show the current entries in the BOOT.INI file
Type bootcfg /rebuild to repair it
Take out the CD ROM and type exit


Corrupted or Missing \WINDOWS\SYSTEM32\CONFIG

If you get the error:
Windows could not start because the following files is missing or corrupt
\WINDOWS\SYSTEM32\CONFIG\SYSTEM or \WINDOWS\SYSTEM32\CONFIG\SOFTWARE
Insert and boot from your WindowsXP CD.
At the first R=Repair option, press the R key
Press the number that corresponds to the correct location for the installation of Windows you want to repair.
Typically this will be #1
Enter in the administrator password when requested
cd \windows\system32\config
Depending on which section was corrupted:
ren software software.bad or ren system system.bad
Depending on which section was corrupted
copy \windows\repair\system
copy \windows\repair\software
Take out the CD ROM and type exit

NTLDR or NTDETECT.COM Not Found

If you get an error that NTLDR is not found during bootup,
If you have FAT32 partitions, it is much simpler than with NTFS.
Just boot with a Win98 floppy and copy the NTLDR or NTDETECT.COM files
from the i386 directory to the root of the C:\ drive.
For NTFS:
Insert and boot from your WindowsXP CD.
At the first R=Repair option, press the R key
Press the number that corresponds to the correct location for the installation of Windows you want to repair.
Typically this will be #1
Enter in the administrator password when requested
Enter in the following commands (X: is replaced by the actual drive letter that is assigned to the CD ROM drive.
COPY X:\i386\NTLDR C\:
COPY X:\i386\NTDETECT.COM C:\
Take out the CD ROM and type exit


Bringing Up the Shutdown Dialog Box

Create a new txt file somewhere on your system, open it and put in this one line:
(new ActiveXObject("Shell.Application")).ShutdownWindows();
Save and Close the file. Change the extension to js and your got it.
You can make a shortcut to that file to make it easy to shut down your system.


Hiding the Last User Logged On

If you use the standard NT style of login and want to hide the last user:
Start the Group Policy Editor (gpedit.msc)
Go to Computer Configuration / Windows Settings / Security Settings / Local Policies / Security Options
Scroll down to Interactive logon: Do not display last user name
Set it to Enable


Poweroff at Shutdown

If your computer does not turn off the power when doing a shutdown,
you may need to edit the registry. I have all the correct BIOS and Power settings and still needed to do this.
Start Regedit
Go to HKEY_CURRENT_USER\Control Panel\Desktop
Edit the key PowerOffActive and give it a value of 1
You can do the same in HKEY_USERS\.DEFAULT\Control Panel\Desktop


Remembering Folder Settings

If XP does not remember your folder settings, delete or rename the following registry keys
[HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\BagMRU]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\Bags]


Preventing Applications from Stealing the Focus

To prevent applications from stealing the focus from the window you are working
Start Regedit
Go to HKEY_CURRENT_USER \ Control Panel \ Desktop
Edit the key ForegroundLockTimeout
Give it a value of 00030d40


Disable Explorer Thumbnail View

If you want disable the Explorer's ability to show the Thumbnail View ,
Start Regedit
Go to HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ Advanced \
Change ClassicViewState to 1

Disable Shared Documents

To disable the Shared Documents folder that shows up on the network
Start Regedit
Go to HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer \
Create a new DWORD Value
Give it the name NoSharedDocuments
Give it a value of 1
Log off or reboot


Removing Thumbs.db Files

When viewing a folder with the Thumbnail view, WindowsXP creates a thumbs.db file.
This is a cache of the current pictures in that directory.
If you want to turn this feature off and save a little disk space
Start the Windows Explorer
Go to Tools / Folder Options / View
In the first section under Files and Folders, check Do not cache thumbnails
Now you can search for the thumbs.db file on your computer and remove them. No more should be created.



Enable / Disable the Task Manager

Start Regedit
Go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System
Create the Dword value DisableTaskMgr
Give it a value of 0 to enable it
Give it a vaule of 1 to disable it


Clearing the Page File on Shutdown

Another way to set the computer to clear the pagefile without directly editing the registry is:
Click on the Start button
Go to the Control Panel
Administrative Tools
Local Security Policy
Local Policies
Click on Security Options
Right hand menu - right click on "Shutdown: Clear Virtual Memory Pagefile"
Select "Enable"
Reboot
If you want to clear the page file on each shutdown:
Start Regedit
Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\ClearPageFileAtShutdown
Set the value to 1


No GUI Boot

If you don't need to see the XP boot logo,
Run MSCONFIG
Click on the BOOT.INI tab
Check the box for /NOGUIBOOT


Using the Classic Search in Explorer

If you prefer to use the classic search style in Explorer,
Start Regedit
Go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState
Add a String Key called Use Search Asst
Give it a value of no


Changing Drive Letters

If you want to change the letters assigned to your fixed or removable drives:
Right Click on My Computer
Select Manage
Select Disk Management
For a Fixed Disk:
Select it
Right click
Select Change Drive Letter and Path
Click on the Edit button
Enter in the letter you want to use
For a Removable Disk:
In the lower, right hand panel, right click on the Disk or CD ROM #
Select Change Drive Letter and Path
Click on the Edit button
Enter in the letter you want to use


Changing the Registered Owner

Start Regedit
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
From there you can edit the name in the Registered Owner key

Decreasing Boot Time

Microsoft has made available a program to analyze and decrease the time it takes to boot to WindowsXP
The program is called BootVis
Uncompress the file.
Run BOOTVIS.EXE
For a starting point, run Trace / Next Boot + Driver Delays
This will reboot your computer and provide a benchmark
After the reboot, BootVis will take a minute or two to show graphs of your system startup.
Note how much time it takes for your system to load (click on the red vertical line)
Then run Trace / Optimize System
Re-Run the Next Boot + Drive Delays
Note how much the time has decreased
Mine went from approximately 39 to 30 seconds.
 
And the last few tips...


Hide/Unhide Logon Names

If you want to hide or unhide the names of users that are displayed on the initial logon screen:
Start Regedit
Go to HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ Winlogon \ SpecialAccounts \ UserList
Add a DWORD with the name of the user account you want to hide
Make sure it has a value of 0
If there is an existing account, you can unhide it by giving it a value of 1


WindowsXP Command Line Utilities

While there are a lot of command line utilities in WindowsXP, here are some that I have been using lately.
bootcfg - Configures, queries, or changes Boot.ini file settings.
driverquery - Displays a list of all installed device drivers and their properties.
getmac - Returns the media access control (MAC) address and list of network protocols associated with each address for all network cards in each computer
gpresult - Displays Group Policy settings and Resultant Set of Policy (RSOP) for a user or a computer
netsh - You can use commands in the Netsh Interface IP context to configure the TCP/IP protocol
schtasks - Schedules commands and programs to run periodically or at a specific time
systeminfo - Displays detailed configuration information about a computer and its operating system

Disabling Hibernation

If you don't want to use up the disk space taken by Hibernation, or don't need to use it at all,
you can easily disable it.
Open up the Control Panel / Power Options icon
Click on the Hibernation icon
Uncheck Enable Hibernation


Increasing System Performance

If you have 512 megs or more of memory, you can increase system performance
by having the core system kept in memory.
Start Regedit
Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\DisablePagingExecutive
Set the value to be 1
Reboot the computer


Common Command Console Utilities

WindowsXP comes with quite a few console utilities you can easily run from the command line:
Computer Management - compmgmt.msc
Disk Managment - diskmgmt.msc
Device Manager - devmgmt.msc
Disk Defrag - dfrg.msc
Event Viewer - eventvwr.msc
Shared Folders - fsmgmt.msc
Group Policies - gpedit.msc
Local Users and Groups - lusrmgr.msc
Performance Monitor - perfmon.msc
Resultant Set of Policies - rsop.msc
Local Security Settings - secpol.msc
Services - services.msc
Component Services - comexp.msc



Automatically Ending Non-Responsive Tasks

Start Regedit
Go to HKEY_CURRENT_USER\Control Panel\Desktop\AutoEndTasks
Set the value to be 1
In the same section, change the WaitToKillAppTimeout to the number of milliseconds you want.


Changing Programs That Start Automatically

WindowsXP has a similar program, MSCONFIG, that was available in Windows98.
This allows you to view and change what programs are automatically started each time you log in.
The new version also allows you to view and edit the boot.ini file (as well as check for errors and use several advanced switches)


Creating an Automated Install of WindowsXP

On the WindowsXP CP, in the SUPPORT\TOOLS directory,
there is a file called DEPLOY.CAB.
Extract the programs DEPLOY.CHM (help file) and SETUPMGR.EXE (main program)
Run SETUPMGR and answer the prompts.
This will create both a unattend.bat and unattend.txt file you can use for automated installs.
Note: The batch file might need some minor modification for file locations but it is fairly basic.
 
An A-Z Index of the Windows NT/XP command line

Will always come in handy.

====================

ADDUSERS Add or list users to/from a CSV file
ARP Address Resolution Protocol
ASSOC Change file extension associations
ASSOCIAT One step file association
AT Schedule a command to run at a later time
ATTRIB Change file attributes
BOOTCFG Edit Windows boot settings
BROWSTAT Get domain, browser and PDC info
CACLS Change file permissions
CALL Call one batch program from another
CD Change Directory - move to a specific Folder
CHANGE Change Terminal Server Session properties
CHKDSK Check Disk - check and repair disk problems
CHKNTFS Check the NTFS file system
CHOICE Accept keyboard input to a batch file
CIPHER Encrypt or Decrypt files/folders
CleanMgr Automated cleanup of Temp files, recycle bin
CLEARMEM Clear memory leaks
CLIP Copy STDIN to the Windows clipboard.
CLS Clear the screen
CLUSTER Windows Clustering
CMD Start a new CMD shell
COLOR Change colors of the CMD window
COMP Compare the contents of two files or sets of files
COMPACT Compress files or folders on an NTFS partition
COMPRESS Compress individual files on an NTFS partition
CON2PRT Connect or disconnect a Printer
CONVERT Convert a FAT drive to NTFS.
COPY Copy one or more files to another location
CSVDE Import or Export Active Directory data
DATE Display or set the date
Dcomcnfg DCOM Configuration Utility
DEFRAG Defragment hard drive
DEL Delete one or more files
DELPROF Delete NT user profiles
DELTREE Delete a folder and all subfolders
DevCon Device Manager Command Line Utility
DIR Display a list of files and folders
DIRUSE Display disk usage
DISKCOMP Compare the contents of two floppy disks
DISKCOPY Copy the contents of one floppy disk to another
DNSSTAT DNS Statistics
DOSKEY Edit command line, recall commands, and create macros
DSADD Add user (computer, group..) to active directory
DSQUERY List items in active directory
DSMOD Modify user (computer, group..) in active directory
ECHO Display message on screen
ENDLOCAL End localisation of environment changes in a batch file
ERASE Delete one or more files
EXIT Quit the CMD shell
EXPAND Uncompress files
EXTRACT Uncompress CAB files
FC Compare two files
FDISK Disk Format and partition
FIND Search for a text string in a file
FINDSTR Search for strings in files
FOR /F Loop command: against a set of files
FOR /F Loop command: against the results of another command
FOR Loop command: all options Files, Directory, List
FORFILES Batch process multiple files
FORMAT Format a disk
FREEDISK Check free disk space (in bytes)
FSUTIL File and Volume utilities
FTP File Transfer Protocol
FTYPE Display or modify file types used in file extension associations
GLOBAL Display membership of global groups
GOTO Direct a batch program to jump to a labelled line
HELP Online Help
HFNETCHK Network Security Hotfix Checker
IF Conditionally perform a command
IFMEMBER Is the current user in an NT Workgroup
IPCONFIG Configure IP
KILL Remove a program from memory
LABEL Edit a disk label
LOCAL Display membership of local groups
LOGEVENT Write text to the NT event viewer.
LOGOFF Log a user off
LOGTIME Log the date and time in a file
MAPISEND Send email from the command line
MEM Display memory usage
MD Create new folders
MODE Configure a system device
MORE Display output, one screen at a time
MOUNTVOL Manage a volume mount point
MOVE Move files from one folder to another
MOVEUSER Move a user from one domain to another
MSG Send a message
MSIEXEC Microsoft Windows Installer
MSINFO Windows NT diagnostics
MSTSC Terminal Server Connection (Remote Desktop Protocol)
MUNGE Find and Replace text within file(s)
MV Copy in-use files
NET Manage network resources
NETDOM Domain Manager
NETSH Configure network protocols
NETSVC Command-line Service Controller
NBTSTAT Display networking statistics (NetBIOS over TCP/IP)
NETSTAT Display networking statistics (TCP/IP)
NOW Display the current Date and Time
NSLOOKUP Name server lookup
NTBACKUP Backup folders to tape
NTRIGHTS Edit user account rights
PATH Display or set a search path for executable files
PATHPING Trace route plus network latency and packet loss
PAUSE Suspend processing of a batch file and display a message
PERMS Show permissions for a user
PERFMON Performance Monitor
PING Test a network connection
POPD Restore the previous value of the current directory saved by PUSHD
PORTQRY Display the status of ports and services
PRINT Print a text file
PRNCNFG Display, configure or rename a printer
PRNMNGR Add, delete, list printers set the default printer
PROMPT Change the command prompt
PsExec Execute process remotely
PsFile Show files opened remotely
PsGetSid Display the SID of a computer or a user
PsInfo List information about a system
PsKill Kill processes by name or process ID
PsList List detailed information about processes
PsLoggedOn Who's logged on (locally or via resource sharing)
PsLogList Event log records
PsPasswd Change account password
PsService View and control services
PsShutdown Shutdown or reboot a computer
PsSuspend Suspend processes
PUSHD Save and then change the current directory
QGREP Search file(s) for lines that match a given pattern.
RASDIAL Manage RAS connections
RASPHONE Manage RAS connections
RECOVER Recover a damaged file from a defective disk.
REG Read, Set or Delete registry keys and values
REGEDIT Import or export registry settings
REGSVR32 Register or unregister a DLL
REGINI Change Registry Permissions
REM Record comments (remarks) in a batch file
REN Rename a file or files.
REPLACE Replace or update one file with another
RD Delete folder(s)
RDISK Create a Recovery Disk
RMTSHARE Share a folder or a printer
ROBOCOPY Robust File and Folder Copy
ROUTE Manipulate network routing tables
RUNAS Execute a program under a different user account
RUNDLL32 Run a DLL command (add/remove print connections)
SC Service Control
SCHTASKS Create or Edit Scheduled Tasks
SCLIST Display NT Services
ScriptIt Control GUI applications
SET Display, set, or remove environment variables
SETLOCAL Control the visibility of environment variables
SETX Set environment variables permanently
SHARE List or edit a file share or print share
SHIFT Shift the position of replaceable parameters in a batch file
SHORTCUT Create a windows shortcut (.LNK file)
SHOWGRPS List the NT Workgroups a user has joined
SHOWMBRS List the Users who are members of a Workgroup
SHUTDOWN Shutdown the computer
SLEEP Wait for x seconds
SOON Schedule a command to run in the near future
SORT Sort input
START Start a separate window to run a specified program or command
SU Switch User
SUBINACL Edit file and folder Permissions, Ownership and Domain
SUBST Associate a path with a drive letter
SYSTEMINFO List system configuration
TASKLIST List running applications and services
TIME Display or set the system time
TIMEOUT Delay processing of a batch file
TITLE Set the window title for a CMD.EXE session
TOUCH Change file timestamps
TRACERT Trace route to a remote host
TREE Graphical display of folder structure
TYPE Display the contents of a text file
USRSTAT List domain usernames and last login
VER Display version information
VERIFY Verify that files have been saved
VOL Display a disk label
WHERE Locate and display files in a directory tree
WHOAMI Output the current UserName and domain
WINDIFF Compare the contents of two files or sets of files
WINMSD Windows system diagnostics
WINMSDP Windows system diagnostics II
WMIC WMI Commands
XCACLS Change file permissions
XCOPY Copy files and folders
 
Last edited:
Typing DOS commands on the Windows Command Line prompt is a most efficient and faster way of doing things in Windows XP. Here's a run-down of the most useful DOS commands available in Windows XP. Some of these DOS commands even do not have an visual alternative.

DOS Command-line tools must be run at the prompt of the Cmd.exe command interpreter. To open Command Prompt, click Start, click Run, type cmd, and then click OK.

ipconfig - Windows IP configuration
Useful for troubleshooting your internet connection. Displays the current IP address of your computer and the DNS server address. If you call your ISP for reporting a bad internet connection, he will probably ask you to run ipconfig.

fc - Free BeyondCompare in XP
FC is an advanced DOS Command that compares two files and displays the differences between them. Though the file comparison results are not as interactive as BeyondCompare or Altova DiffDog, fc is still very useful. You can even set fc to resynchronize the files after finding a mismatch.

type - open text files sans Notepad
Similar to Unix cat command, Type is my favorite DOS command for displaying the contents of a text files without modifying them. When used in combination with more switch, type splits the contents of lengthy text files into multiple pages. Avoid using the type command with binary files or you'll hear alien PC beeps and see some greek characters on your PC.

ping - Say hello to another computer
Ping network command followed by the web-address or IP address tells you about the health of the connection and whether the other party is responding to your handshake request. Ping tool can also be used to convert the web address to a physical IP address.

tree - visual directory structure
You often need to take prints of your physical directory structure but XP has no simple "visual" commands for printing directory contents. Here, try the Tree DOS command and redirect the output to a text file.

tree > mydirectory.txt
print mydirectory.txt

attrib - make hidden files visible
Attrib lets you change attributes of System files and even hidden files. This is great for troubleshooting Windows XP. Say your XP doesn't boot ever since you edited that startup boot.ini file (Hidden), use attrib to remove the Hidden attibute and edit the file using EDIT dos command.

assoc - which program will open that .xyz file
The assoc DOS command can be used to either isplay or even modify the file name extension associations. The command assoc .htm will quickly tell you the name of your default web browser (see picture)

move - more flexible than copy-paste
Say you got a lot of XLS and DOC files in you MyDocuments folder and want to move only those XLS files that have their name ending with 2006. In XP Explorer, you have to manually select each file and then cut-paste to another folder. However, the DOS move command make things much simpler. Just type the following at the command prompt:
move *2006.xls c:\2006Reports\

find - advanced file search with filter
Find is the most powerful DOS command and even more useful than the Windows Desktop Search tool or the Windows Find Wizard. The find command searches for a specific string of text in a file or files. After searching the specified file or files, find displays any lines of text that contain the specified string.

To search your hard disk to find and display the file names on drive C: that contain the string "Google" use the pipe (|) to direct the results of a dir command to find as follows:
dir c:\ /s /b | find "Google"

Quick tip - Drag to avoid typing: When your command acts on a file or folder, you must type the path to that folder after the command. You can save typing time by dragging the file or folder from Windows Explorer into the command window.

To view help at the command-line, at the command prompt, type the following:
CommandName /?

Related resources on Microsoft Website:
List of DOS Commands with Examples | Command Line Redirection Methods
Windows repair:::



There should NOT be autorun.inf in HD volume root. If you have one, delete it. Try typing this in "run" menu to reveal it:

attrib C:\autorun.inf -r -h -s

or

attrib D:\autorun.inf -r -h -s

that should make it visible and easy do delete. It is NOT important system file. It is only MARKED as system file.

Unable to open drives in windows explorer

1.
click "run" in your start menu and type in "regedit". That should start the registry editor.
- if there are expanded branches in your first run, collapse them all and expand one called "HKEY_CLASSES_ROOT". First one from the top.
- find key called "drive" on the next level. Expand it and click on the "shell" sub-key. (pic no. 1)
The
picture shows what your registry should look like. Note the status bar at the bottom says "My Computer\HKEY_CLASSES_ROOT\Drive\shell" - exact location of where you should look. Also note on the right side "default REG_SZ none". You can ignore REG_SZ part. Important thing there is that default - none. That is what it should read on your PC. Let's say that in my case the default value says "ACDBrowse", then the picture No. 3 shows what exactly would be activated ("C:\Program Files\ACD Systems\ACDSee\8.0.Pro\ACDSee8Pro.exe" "%1") on the double-click. ACDSee would start. Also, on the right click, first (bold text) item would be what the picture No 2 shows "Browse with ACDSee Pro" - user-friendly name of "ACDBrowse" sub-key.


The conclusion: In the "HKEY_CLASSES_ROOT\Drive\shell" key the default value should be "none". (as text, not empty)


One more thing:

DO NOT DELETE ANY KEYS!

ONLY CHANGE THE DEFAULT VALUE OF THE ABOVE KEY!
THERE IS NO UNDO FUNCTION IN REGISTRY EDITOR!


2.
In some situation especially when anti-virus program has cleaned, healed, disinfected or removed a worm, trojan horse or virus from computer, there may be error happening whenever users try to open or access the drive by double clicking on the disk drive icon in Explorer or My Computer window to try to enter the drive’s folder. The problem or symptom happens in hard disk drive, portable hard disk drive or USB flash drive, and Windows will prompt a dialog box with the following message:


Windows Script Host
Can not find script file autorun.vbs.
Sometimes you will be asked to debug the VBScript with error code of 800A041F - Unexpected ‘Next’.
or
Choose the program you want to use to open this file with:
In this case, the “Always use the selected program to open this kind of file” option is grayed out.
The symptom occurs because when autorun.vbs is created by trojan horse or virus. The virus normally loads autorun.inf file to root folder of all hard drive or USB drive, and then execute autorun.bat file which contains script to apply and merge autorun.reg into the registry, with possible change to the following registry key to ensure that virus is loaded when system starts:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
Userinit=userinit.exe,autorun.exe

Finally, autorun.bat will call wscript.exe to run autorun.vbs.
When antivirus or security software detected the autorun.vbs file as infected, the file will be deleted or removed or quarantined. However, other files (autorun.* and registry value still referring to autorun.vbs, and this document no longer exists, hence the error when users double click to open a drive folder.
To correct and solve this error, follow this steps:
  1. Run Task Manager (Ctrl-Alt-Del or right click on Taskbar)
  2. Stop wscript.exe process if available by highlighting the process name and clicking End Process.
  3. Then terminate explorer.exe process.
  4. In Task Manager, click on File -> New Task (Run…).
  5. Type “cmd” (without quotes) into the Open text box and click OK.
  6. Type the following command one by one followed by hitting Enter key:
del c:\autorun.* /f /s /q /a
del d:\autorun.* /f /s /q /a
del e:\autorun.* /f /s /q /a

c, d, e each represents drive letters on Windows system. If there are more drives or partitions available, continue to command by altering to other drive letter. Note that you must also clean the autorun files from USB flash drive or portable hard disk as the external drive may also be infected.
  1. In Task Manager, click on File -> New Task (Run…).
  2. Type “regedit” (without quotes) into the Open text box and click OK.
  3. Navigate to the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
  1. Check if the value name and value data for the key is correct (the value data of userint.exe include the path which may be different than C drive, which is also valid, note also the comma which is also needed):
“Userinit”=”C:\WINDOWS\system32\userinit.exe,”
If the value is incorrent, modify it to the valid value data.
 
15 Top Windows XP secrets

1. Useful key shortcuts available:

- Windows key + D - shows the desktop
- Windows key + M - minimizes all open windows
- Windows key + Shift + M - maximizes all open windows
- Windows key + E - Runs Windows
- Windows key + R - shows the RUN dialog
- Windows key + F - shows Search window
- Windows key + Break - shows System Properties box
- Windows key + TAB - Go through taskbar applications
- Windows key + PAUSE Display the System Properties dialog box
- Windows key + U Open Utility Manager
- ALT + TAB - Cycle through opened applications
- Hold down CTRL while dragging an item to Copy it
- CTRL + ESC Display the Start menu
- ALT + ENTER View the properties for the selected item
- F4 key Display the Address bar list in My Computer or
- NUM LOCK + Asterisk (*) Display all of the subfolders that are under the selected folder

2. Lock Windows to protect computer
You can lock Windows to protect the computer when leaving the station easily by creating a shortcut with the path rundll32.exeuser32.dll, LockWorkStation. The Windows key + L is also a shortcut to this feature.

3. Edit sysoc.inf to list all software
To show all software that can be removed from your computer (including protected Windows services), you can manually edit (using notepad for example) the sysoc.inf file located in Windows\inf\. Just remove the word hide next to the software pack.
*Note* - use this at your own risk. Removing critical components of the system will make Windows instable.

4. Windows XP comes with IPv4 and IPv6
Windows XP comes both IPv4 and IPv6 support. To enable IPv6, you can install the protocols needed with the command "ipv6 install" in the command-prompt. Then type ipv6 /? to see the options. The installation will not remove the IPv4 protocols so your current configuration will still work.

5. Access Task Manager with shortcut
To access the Task Manager easier, you can make a shortcut that points to %windir%\system32\taskmgr.exe.

6. Stop treating ZIP files like Folders
If you don't want your Windows XP to treat ZIP files like folders, you can disable this component by running regsvr32 /u zipfldr.dll at the command prompt or Run dialog. If you start missing it, you can enable it by typing regsvr32 zipfldr.dll.

7. Run program as diffrent user
You can run a program as a different user. Right click an application and select Run As command.

8. Switch users leaving applications opened
You can switch users leaving the applications opened too (*NOTE* use this only when needed since it could lead to system instability).
Go to Task Manager - processes and end the process explorer.exe. This will end only your session and not all applications. Then go to Applications tab, click New task and type runas /user:domainname\username explorer.exe. A password prompt will appear to login to the desired username. The user's session will start, with all your previously applications running.
I recommend to open first a command-line prompt and type runas /? to see all the options available.

9. Rename multiple files in Windows at once
Rename multiple files in Windows at once. Select them all, right click and select Rename. Enter the desired name. They will be renamed using what you specified, with a number in brackets to distinguish them.

10. Task kill feature in Windows
Windows has a task kill feature similar to Linux. Go to a command prompt and run the command tasklist to see running processes with PID numbers. Then type tskill <PID> to end the specific task. This forces an instant closing of the task.

11. Edit features with GPEDIT.MSC
You can edit many features by running gpedit.msc. You can add log on/log off scripts here and many features.

12. Edit accounts in the command prompt
You can edit accounts by running "control userpasswords2" at the command prompt.

13. Use systeminfo.exe to see System Information
You can use the systeminfo.exe command in the command prompt to see System Information, including all Windows updates and hotfixes.

14. Disable system services for maximum performance
There are system services that you can disable to free up the system's load. To access the interface that permits you to make changes to system's services, type services.msc and the command prompt.
This is a list of services that are *usually* useless and can be safely disabled.
Alerter
Application Layer Gateway Service,
Application Management
Automatic Updates
Background Intelligent Transfer
Clipbook
Distributed Link Tracking Client
Distributed Transaction Coordinater
Error Reporting Service
Fast User Switching Compatibility
IMAPI CD-Burning
Indexing Service
IPSEC Services
Messenger
Net Logon
Net Meeting
Remote Desktop Sharing
Network DDE
Network DDE DSDM
Portable Media Serial Number
Remote Desktop Help Session Manager
Remote Registry
Secondary Logon
Smartcard
SSDP Discovery Service
Uninterruptible Power Supply
Universal Plug and Play Device Host
Upload Manager
Webclient
Wireless Zero Configuration
WMI Performance Adaptor

*NOTE*: Make sure you don't need them since some applications you're using could depend on them. If you make any application to fail by disabling any of the services, go back and enable it again.

15. Repair Windows XP by using the XP installation CD
If your system failes to start due to an error related to missing HAL.DLL, invalid Boot.ini or any other critical system boot files you can repair this by using the XP installation CD. Simply boot from your XP Setup CD and enter the Recovery Console. Then run "attrib -H -R -S" on the C:\Boot.ini file and delete it. Run "Bootcfg /Rebuild" and then Fixboot.
 
Speed up Hard Disk

To speed up your hard disk speed we need to configure a special buffer in the computer's memory in order to enable it to better deal with interrupts made from the disk.
This tip is only recommended if you have 256MB RAM or higher.

Follow these steps:

Run SYSEDIT.EXE from the Run command.

Expand the system.ini file window.

Scroll down almost to the end of the file till you find a line called [386enh].

Press Enter to make one blank line, and in that line type

Irq14=4096

Note: This line IS CASE SENSITIVE!!!

Click on the File menu, then choose Save.

Close SYSEDIT and reboot your computer.

Done. Speed improvement will be noticed after the computer reboots.
Update: The most speed improvement is visible with IDE drives, however there are reports that this tweak also does good for SCSI disks. In any case, it won't harm your system, so why not try it yourself and let me know what you find!
 
Back
Top