Kaseya Community

Block USB Ports

  • Hi to all

    I need know, if someone of you know, some script for block USB ports, I have been looking at Internet, the site where Windows save this information, for modify through of a script but I dont know how.

    your help will be grateful

    Abril Segura

    Legacy Forum Name: Block USB Ports,
    Legacy Posted By Username: asegura
  • asegura
    Hi to all

    I need know, if someone of you know, some script for block USB ports, I have been looking at Internet, the site where Windows save this information, for modify through of a script but I dont know how.

    your help will be grateful

    Abril Segura


    Try this if you still want USB keyboards and mice to work but not USB storage:

    http://www.petri.co.il/forums/showthread.php?t=3299

    Michael

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: RCS-Michael
  • Hi, I made your suggestion and it That worked, this is the form:


    1. you need block the files usbstor.pnf and usbstor.inf, these files are in the folder c:\windows\inf, only affect to USB Store ok
    2. Wink
    3. you need applied the next script:


    If True

    Step 1
    Set Registry Value

    HKEY_LOCAL_MACHINE\SYSTEM\CURRENTCONTROLSET\SERVICES\USBSTOR\START

    4

    REG_DWORD

    Stept 2
    Rename locked file

    c:\windows\inf\usbstor.pnf

    c:\windows\inf\usbstor1.pnf

    stept 3
    Rename locked file

    c:\windows\inf\usbstor.inf

    c:\windows\inf\usbstor1.inf

    And if you wont, you can add one more step for reboot machine

    Also if you wont undo the effects, only need change the registry value to 3, and blocked the files with the new name, rename to original name and its ready.

    I hope that, this will be utility for you Stick out tongue

    Regards

    Abril Segura

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: asegura