A Windows XP session can be locked easily. By doing this, any unauthorized access to the system can be prevented. There are several ways to implement this. Through the shortcut option you get when you right click on the desktop, Windows XP can be locked. Another method is to create a batch file with extension name .bat in Notepad. Alternatively, the use of DOS can also be helpful in locking the session and maintaining privacy.