I have a VBScript that runs a .reg file (I do this so the user cant see it running)
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "regedit /s C:\Users\John\Desktop\OpenPorts.reg" ,1 ,True
Set WshShell = Nothing
which then runs the .reg file below
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\USBSTOR]
"Start" == dword:00000003
Can I combine this process into 1 VBScript that will make the changes without using a .reg file?
This should work :
Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegWrite "HKLM\SYSTEM\CurrentControlSet\services\USBSTOR\Start", 3, "REG_DWORD"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With