Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1479
  • Last Modified:

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

I am looking for a VBScript to disable write access only for USB and CD-ROM drives for Windows 7

Thanks.
0
rogersgw
Asked:
rogersgw
  • 2
1 Solution
 
shahzoorCommented:
you can do it easily using group policy
gpedit.msc
0
 
rogersgwAuthor Commented:
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
 
antloweCommented:
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
 
rogersgwAuthor Commented:
Great work, thanks.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now