I need to disable cd-rom and usb drive access for certain users, via a batch file or something similar so that it can be scripted/automated. Any suggestions on how to do this?

Generally that is a setting that actually disables on the computer rather than an end user. My suggestion would be to set up a guest account on the computer and disable those ports for that account. And when you are on the computer, you being the Admin, you can re-enable those.

If you want to change this setting in same pc ,Then go to the security tab and change the permission .If you want to change the permission on network pc then use server window and change the permission .

You can edit local group policy for a specific user group. You will need to setup a unique local user group for these users.

Here are instructions to access group policy for a specific usergroup:

Short Version:
1. Start -> Run -> mmc
2. File -> Add/Remove Snap-in
3. Scroll Down the list on the left hand side and find Group Policy Object
4. Select Group Policy Object and hit add
5. Click Browse when the box pops up
6. Click the Users tab at the top of the box
7. Select the user you wish to configure
8. Click OK
9. Click Finish
10. Click OK
11. Click File -> Save As
12. Name the file something useful like "Tom's Group Policy Preferences"
13. Click Save

Now you should be able to quickly load this by going into your administrative tools folder and clicking on the "Tom's Group Policy Preferences" icon.

Important: Do not applying the settings the administrator account.

Here is an article with all of the settings, and where they are located.


For those that don't want to read the article they are located at:
Computer Configuration -> Administrative Templates -> System -> Removable Storage Access