Hi,
We are having an issue with our login script, we have software install after users logon which makes a change to the registry. We need our script to detect changes in registry and run a software registry update. How can we have this script loop / run every 5 seconds for 2 minutes, polling the registry for changes? So registry changes which are made after login can be picked up by this script.
Const HKEY_CURRENT_USER = &H80000001
strComputer = "."
Set objRegistry = GetObject("winmgmts:\\" & _
strComputer & "\root\default:StdRegProv")
strKeyPath = "Software\Hewlett-Packard\network\Lex"
strValueName = "bbnv"
objRegistry.GetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName, strValue
If IsNull(strValue) Then
WshShell.Run "regedit /S X:\disableaddins.reg", 0, True
Else
WshShell.Run "regedit /S X:\installaddins.reg", 0, True
End If