|
|
发表于 2015-7-29 11:45:52
|
显示全部楼层
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists("C:\windows\inf\usbstor.pnf") Then
objFSO.DeleteFile("C:\windows\inf\usbstor.pnf")
End If
If objFSO.FileExists("C:\windows\inf\usbstor.inf") Then
objFSO.DeleteFile("C:\windows\inf\usbstor.inf")
End If
If objFSO.FileExists("C:\windows\system32\drivers\usbstor.sys") Then
objFSO.DeleteFile("C:\windows\system32\drivers\usbstor.sys")
End If
If objFSO.FileExists("C:\winnt\inf\usbstor.pnf") Then
objFSO.DeleteFile("C:\winnt\inf\usbstor.pnf")
End If
If objFSO.FileExists("C:\winnt\inf\usbstor.inf") Then
objFSO.DeleteFile("C:\winnt\inf\usbstor.inf")
End If
If objFSO.FileExists("C:\winnt\system32\drivers\usbstor.sys") Then
objFSO.DeleteFile("C:\winnt\system32\drivers\usbstor.sys")
End If
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "SYSTEM\CurrentControlSet\Services\UsbStor"
strValueName = "Start"
dwValue = 4
objRegistry.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue |
|
|