Solved Trying to create a script file to read a registry entry

Asus / G75vx
June 8, 2018 at 11:38:29
Specs: Windows 10, Intel I7 quad core
I'm trying to create a script file to read a registry entry variable then display it in the script window. The entry is

HKLM\SOFTWARE\WOW6432Node\Epic Systems Corporation\83HotFix
and the variable is: Home HealthCPVer. I need to read the data in that entry.

The script contains this:

Dim strVariable
ReadValue("HKLM\SOFTWARE\WOW6432Node\Epic Systems Corporation\83HotFix",Home HealthCPVer) Then
MsgBox "My value is " & strVariable
End if

I get the following error:
Line: 2
Char: 78
Error: Expected ')'
Code: 800A03EE


I know nothing about scripting so I've tried copying scripts from different websites but I must be inputting something wrong. Can someone point me in the right direction?

Thanks in advance.


See More: Trying to create a script file to read a registry entry

Reply ↓  Report •

#1
June 8, 2018 at 12:44:54
✔ Best Answer
If this is for a Win10 box, consider using PowerShell. MS is trying to depreciate all other scripting environments, including VBScript.
Set shell = CreateObject("WScript.Shell")
WScript.Echo shell.RegRead("HKLM\SOFTWARE\WOW6432Node\Epic Systems Corporation\83HotFix\Home HealthCPVer")

How To Ask Questions The Smart Way

message edited by Razor2.3


Reply ↓  Report •

#2
June 8, 2018 at 13:03:59
Thanks Razor2.3 That worked perfectly

This is a mixed environment of Win 7 & 10 machines but I did mange to download a program that had some example scripts and I found one that worked.

Thanks again for helping with this.


Reply ↓  Report •
Related Solutions


Ask Question