Announcement

Collapse
No announcement yet.

Trying to enable USB Devices

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Trying to enable USB Devices

    Sorry to dig up an old thread but I have been trying to implement this and have so far had limited success.

    I ran the initial script. . .
    @echo off
    cls
    regedit /s 0.reg
    subinacl.exe /keyreg \system\currentcontrolset\services\usbstor /deny=system
    subinacl.exe /keyreg \system\currentcontrolset\services\usbstor /deny=users
    subinacl.exe /keyreg \system\currentcontrolset\services\usbstor /deny=administrators
    echo.
    echo **Disabled**
    echo.
    pause
    . . .and everything seemed to work fine. I restarted the computer, plugged in some flash drives that have never been on this machine before and though the drivers were installed, the flash drives did not mount.

    Awesome!

    My hangup is in re-enabling the usb ports (which will be crucial from an IT standpoint). I ran what looks to be like the "opposite" script. . .

    @echo off
    cls
    subinacl.exe /keyreg \system\currentcontrolset\services\usbstor /grant=system
    subinacl.exe /keyreg \system\currentcontrolset\services\usbstor /grant=users
    subinacl.exe /keyreg \system\currentcontrolset\services\usbstor /grant=administrators
    regedit /s 1.reg
    echo.
    echo **Enabled**
    echo.
    pause
    . . . but instead of getting success messages across the board, I got this instead:

    HKEY_LOCAL_MACHINE\system\currentcontrolset\servic es\usbstor : 2 The system cann
    ot find the file specified.



    Elapsed Time: 00 00:00:00
    Done: 1, Modified 0, Failed 1, Syntax errors 0
    Last Done : HKEY_LOCAL_MACHINE\system\currentcontrolset\servic es\usbstor
    Last Failed: HKEY_LOCAL_MACHINE\system\currentcontrolset\servic es\usbstor : 2 Th
    e system cannot find the file specified.

    HKEY_LOCAL_MACHINE\system\currentcontrolset\servic es\usbstor : 2 The system cann
    ot find the file specified.



    Elapsed Time: 00 00:00:00
    Done: 1, Modified 0, Failed 1, Syntax errors 0
    Last Done : HKEY_LOCAL_MACHINE\system\currentcontrolset\servic es\usbstor
    Last Failed: HKEY_LOCAL_MACHINE\system\currentcontrolset\servic es\usbstor : 2 Th
    e system cannot find the file specified.

    HKEY_LOCAL_MACHINE\system\currentcontrolset\servic es\usbstor : 2 The system cann
    ot find the file specified.



    Elapsed Time: 00 00:00:00
    Done: 1, Modified 0, Failed 1, Syntax errors 0
    Last Done : HKEY_LOCAL_MACHINE\system\currentcontrolset\servic es\usbstor
    Last Failed: HKEY_LOCAL_MACHINE\system\currentcontrolset\servic es\usbstor : 2 Th
    e system cannot find the file specified.


    **Enabled**

    Press any key to continue . . .
    What am I missing here guys? It seems like everything should be in line but I check the registry and HKEY_LOCAL_MACHINE\system\currentcontrolset\servic es\usbstor doesn't seem to exist. I assumed that was because of the acl change, but now it seems even subinacl cannot find it.

    Are there any glaring errors I am missing?

    Thanks for your help.

  • #2
    Re: How to disable USB Drives (jump/flash/external/etc.)

    And when trying the same scripts from a different machine (after disabling) I get this error message instead:

    HKEY_LOCAL_MACHINE\system\currentcontrolset\servic es\usbstor - AddAce error : 87
    The parameter is incorrect.



    Elapsed Time: 00 00:00:00
    Done: 1, Modified 0, Failed 1, Syntax errors 0
    Last Done : HKEY_LOCAL_MACHINE\system\currentcontrolset\servic es\usbstor
    Last Failed: HKEY_LOCAL_MACHINE\system\currentcontrolset\servic es\usbstor - AddA
    ce error : 87 The parameter is incorrect.

    HKEY_LOCAL_MACHINE\system\currentcontrolset\servic es\usbstor - AddAce error : 87
    The parameter is incorrect.



    Elapsed Time: 00 00:00:00
    Done: 1, Modified 0, Failed 1, Syntax errors 0
    Last Done : HKEY_LOCAL_MACHINE\system\currentcontrolset\servic es\usbstor
    Last Failed: HKEY_LOCAL_MACHINE\system\currentcontrolset\servic es\usbstor - AddA
    ce error : 87 The parameter is incorrect.


    **Enabled**
    The .reg files are just the registry edits that everyone was talking about and I don't think they are the issue because it has something to do with permissions accessing the files.

    Any help that can be offered on this would be hugely appreciated.

    Comment

    Working...
    X