VBScript Question

madhatter5501 used Ask the Experts™
I am trying to write a vbscript that will check the value of registry key.


I want to know if this is ChromeHTML or FirefoxHTML, or htmlfile

This is what I have so far but it won't display the key.

What is wrong with the code?

Option Explicit
Dim objShell, regHtmlkey, HtmlKey

regHtmlkey = "HKEY_CURRENT_USER\Software\Classes\.html"

Set objShell = CreateObject("WScript.Shell")
HtmlKey = objShell.RegRead(regHtmlkey)

WScript.Echo HtmlKey & " is the default key"

Open in new window

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
regHtmlkey = "HKEY_CURRENT_USER\Software\Classes\.html\"



Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial