Why Data May Be Lost If Two Users Edit and Save the Same File in Separate Logon Instances (304789)



The information in this article applies to:

  • Microsoft Windows XP Home Edition
  • Microsoft Windows XP Professional

This article was previously published under Q304789

SUMMARY

This article explains why you may lose some of the changes you make to a file in the following scenario: You and another person both work on the same open file at the same computer, and the other person saves the edited file after you have already saved your changes to the file.

MORE INFORMATION

When two or more users are logged on to a computer that runs Windows XP Home Edition (or Windows XP Professional if the computer is not joined to a domain), both users can edit and save the same file. However, the system retains only the file that is saved last. Changes in the file that was already saved are lost.

Windows XP allows two users to log on to the same computer at the same time, but neither user can see what the other is working on. The second user therefore cannot see that the file is already open for editing, and the program does not check to see whether another instance of the program or of the file is already in use.

Note that this behavior can occur in some programs such as Notepad.exe, but does not occur in Microsoft Office programs such as Microsoft Word.

You can observe the behavior by opening two instances (Instance1 and Instance2) of Notepad.exe, and then opening and editing the same file in each instance. Instance1 saves the edited file and then closes. When Instance2 saves a different edited version of the file, you lose the changes in Instance1.

Steps to Reproduce the Behavior

  1. In Control Panel, under User Accounts, create two or more user accounts.
  2. Log on by using the first user account.
  3. On drive C, create a new file named ForAllUsers.txt.
  4. Open the C:\ForAllUsers.txt file, and then type some text in the file. Do not save the file, and do not close the file. Keep the file open.
  5. Click Start, click Log Off, and then click Switch User.
  6. Log on by using the second user account.
  7. Open C:\ForAllUsers.txt, which looks empty, and then type some text in the file. Save and close this file.
  8. Click Start, click Log Off, and then click Switch User.
  9. Log on by using the first user account, and then save the C:\ForAllUsers.txt file.
  10. Click Start, click Log Off, and then click Switch User.
  11. Log on by using the second user account, and then open the C:\ForAllUsers.txt file. Note that the text that you typed and saved as the second user is gone. Only the text that you typed and later saved as the first user is present.

Modification Type:MajorLast Reviewed:10/18/2001
Keywords:kbenv kbinfo kbui KB304789