Scripting using auturn
I have a VBScript that runs a .reg file (I make it so that the user cannot run it)
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
Is it possible to combine this process into 1 VBScript that will make changes without using a .reg file?
+3
Katler
source
to share
2 answers
This should work:
Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegWrite "HKLM\SYSTEM\CurrentControlSet\services\USBSTOR\Start", 3, "REG_DWORD"
+1
Jesus
source
to share
It should be possible, I've never tested it, but msdn says it's ok, so :) Here are some docs with a small sample: http://msdn.microsoft.com/en-us/library/yfdfhz1b%28v=vs .84% 29.aspx
0
Jesus
source
to share