Disable Windows 7 CDROM

Hi,
I want to disable the Windows 7 CDROM using a script which runs at startup automatically with administrator privileges.

Can someone tell me what script should be written?

I don’t know if you can do with a script, but you can do it manually by removing the the drive from Disk Management Console. Run diskmgmt.msc, right click your cdrom, change drive letter…, and choose remove. Disk Management can only run by administrator privelege. So, it will suit your need (except the script).

Do you want to disable the autorun window or all access to the CD drive? There is a way to do this without needing to write a script or having to break anything.

To disable autorun, click the start button and type: gpedit.msc

Then, navigate to [Computer Configuration/Administrative Templates/Windows Components/Autoplay Policies]

Then, double click “turn off autoplay” and select “enable”. Click ok and apply.

To disable access to the CD drive, click the start button and type: gpedit.msc

The, navigate to [Computer Configuration\Administrative Templates\System\Removable Storage Access]

Enable or disable “CD and DVD: Deny read access” and/or “CD and DVD: Deny write access” as appropriate.

[URL=“http://support.microsoft.com/kb/967715”]