如何通过VBScript刷新注册表设置?

如何通过VBScript刷新注册表设置?,vbscript,proxy,windows-7,dns,registrykey,Vbscript,Proxy,Windows 7,Dns,Registrykey,我正在通过修改注册表值来修改代理设置。 在这之后,我将重新启动我的Windows7计算机。但即使在系统重新启动后,也需要大约10分钟来反映这些更改 有没有办法在注册表更新后立即刷新设置 我已尝试刷新DNS缓存 objShell.Run("ipconfig /flushdns"),1,True 通过以下方式终止并运行Explorer.exe,尝试刷新Explorer.exe: Option Explicit Dim ProcessName : ProcessName = "Explorer.ex

我正在通过修改注册表值来修改代理设置。 在这之后,我将重新启动我的Windows7计算机。但即使在系统重新启动后,也需要大约10分钟来反映这些更改

有没有办法在注册表更新后立即刷新设置

我已尝试刷新DNS缓存

objShell.Run("ipconfig /flushdns"),1,True

通过以下方式终止并运行Explorer.exe,尝试刷新Explorer.exe

Option Explicit
Dim ProcessName : ProcessName = "Explorer.exe"
Refresh(ProcessName)
'*********************************************************************
Sub Refresh(ProcessName)
Kill(ProcessName)
RunIt(ProcessName)
End Sub
'*********************************************************************
Sub Kill(ProcessName)
Dim Ws : Set Ws = CreateObject("Wscript.Shell")
Dim Command : Command = "Taskkill /F /IM "& ProcessName &""
Dim Result : Result = Ws.Run(Command,0,True)
End Sub
'*********************************************************************
Sub RunIt(ProcessName)
Dim Ws : Set Ws = CreateObject("Wscript.Shell")
Dim Result : Result = Ws.Run(ProcessName,1,False)
End Sub
'*********************************************************************