Improve company productivity with a Business Account.Sign Up
' Define registry path to value to manipulate
strKey = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tomcat8\Type"
' Create Shell object
Set objShell = CreateObject("Wscript.Shell")
' Trap errors in code
On Error Resume Next
' See if we can read the current value
strValue = objShell.RegRead(strKey)
' Check if we read it
If Err.Number = 0 Then
' Display current value (debugging)
WScript.Echo "Current value = " & strValue
' Update value if needed
If strValue = 10 Then
objShell.RegWrite strKey, 110, "REG_DWORD"
' Error reading current value, display error (debugging)
WScript.Echo "Registry key not found."
Open in new window
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.