KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
On the line "If (IsNull(value)) then" below is my code correct? I want to check if the registry key exists and if not then show a web page. Option Explicit On error resume next Dim SysVarReg, Value Set SysVarReg = WScript.CreateObject("WScript.Shell") value = SysVarReg.RegRead ("HKCU\Software\test\FirstLogonComplete") If (IsNull(value)) then Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run "c:\Program Files\Internet Explorer\iexplore.exe https://intranet/start.htm" Dim SysVarReg2, Value2 Value2 = "TRUE" Set SysVarReg2 = WScript.CreateObject("WScript.Shell") SysVarReg2.RegWrite "HKCU\Software\test\FirstLogonComplete", Value2 else wscript.echo "Already logged on" end if
Tags (comma-separated)
Save Edits
Cancel