for Windows XP?
a few ways to do this.
Open Windows Explorer by pressing the Windows + "e" key.
Right-click the desired CD-ROM and select Properties from the menu.
Select the AutoPlay tab.
Select each item from the pulldown list and for the Action to perform, select "Take no action" to disable autorun, or pick the apporpriate action to take if enabling autorun.
Select OK.
or a
registry tweak.
Or use TweakUI PowerToy.
Also apparently if you have turned off AutoPlay everywhere, you can still bring it up when you insert a CD–by holding down the Shift key.
If its for Vista then Auto play has its very own Control Panel section just for this. Control Panel > Auto Play.