It is safest to disable CD autoplay in XP using either local group policy or, for an enterprise, an Active Directory group policy. The local group policy editor method:
Click Start
Click Run
Enter GPEDIT.MSC
Group Policy mmc will popup. On left panel:
Double-click Computer Configuration to open submenu
Double-click Administrative Templates to open submenu
Double-click System to open submenu
Double-click Turn autoplay off option which will be near the bottom of the list in the right panel.
The default is the Not configured . Set it to Enabled.