csilvio
asked on
Script to disable or enable usb
We have the USB Storage locked down, and there's also a support group to whom we're giving access to open or disbale again the usb storage.
The script to enable usb storage is:
Set WSHShell = WScript.CreateObject("WScr ipt.Shell" )
WshShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM \CurrentCo ntrolSet\S ervices\US BSTOR\Star t", 4,"REG_DWORD"
and to enable:
Set WSHShell = WScript.CreateObject("WScr ipt.Shell" )
WshShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM \CurrentCo ntrolSet\S ervices\US BSTOR\Star t", 3,"REG_DWORD"
I need to merge these two options oin one script, where the user will be asked if he wants either to enable or disable the usb.
Thanks
The script to enable usb storage is:
Set WSHShell = WScript.CreateObject("WScr
WshShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM
and to enable:
Set WSHShell = WScript.CreateObject("WScr
WshShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM
I need to merge these two options oin one script, where the user will be asked if he wants either to enable or disable the usb.
Thanks
ASKER
Hey thanks that qworks.
But can you make it a bit straight forward?
Maybe by just having two buttons to press, one disable and other enable, instead of inputting anything. By just clicking either enable or disable.
Thanks :)
But can you make it a bit straight forward?
Maybe by just having two buttons to press, one disable and other enable, instead of inputting anything. By just clicking either enable or disable.
Thanks :)
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
That's great thanks a lot.
Thanks for your immediate reply and for being so helpful.
Thanks for your immediate reply and for being so helpful.
But how we use it?
Open in new window