I'm not sure about XP, but in Windows 7, there's an AutoPlay section in the Control Panel.
Does a window pop up whenever you plug in a device asking you how you'd like to import files on them? If so, there should be a button near the bottom that says "Import Settings" where you can tell Windows not to auto import photos.