Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

VBScript to disable write access for USB and CD-ROM drives for Windows 7

Posted on 2012-04-11
4
1,458 Views
Last Modified: 2012-06-21
I am looking for a VBScript to disable write access only for USB and CD-ROM drives for Windows 7

Thanks.
0
Comment
Question by:rogersgw
  • 2
4 Comments
 
LVL 14

Expert Comment

by:shahzoor
ID: 37835325
you can do it easily using group policy
gpedit.msc
0
 

Author Comment

by:rogersgw
ID: 37835369
Yes, but I am trying to automate this process and not use Group Policy for each machine.  We cannot add this to the domain.
0
 
LVL 2

Accepted Solution

by:
antlowe earned 500 total points
ID: 37835861
do you want them to still be able to read from the devices?

The below text if copied into notepad and saved as a .reg should achieve that for you.
as for pushing it out, im assuming you have a list of computers you want to run it on.

in which case its a simple script to run though each computer and apply the regkey.

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies]
“WriteProtect”=dword:00000001
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoCDWriting"=dword:00000001
0
 

Author Closing Comment

by:rogersgw
ID: 37836124
Great work, thanks.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

By default the complete memory dump option is disabled in windows . If we want to enable the complete memory dump for a diagnostic purpose, we have a solution for it. here we are using the registry method to enable this.
A quick guide on how to use Group Policy to create a custom power plan and set it active on Windows 7.
This Micro Tutorial will teach you how to the overview of Microsoft Security Essentials. This is a free anti-virus software that guards your PC against viruses, spyware, worms, and other malicious software. This will be demonstrated using Windows…
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question