Advertisement

01.11.2008 at 01:13AM PST, ID: 23075164
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.4

Unable to read registry of Thin Client with vbscript

Asked by Schurink in VB Script

Tags:

Hi All,
We use a script to read some DAT version of McAfee etc from a few desktops, and that works good. When we use this script te read from the registry of a Thin Client (HP t5720) then no values are returned. We cant find why we get nothing returned. The values and keys are at the exact location as they are on the workstations and we have admin rights on the Thin Clients.
The script we use is pasted below.
Does any of you know why we get nothing returned from the HP thin client?
Cheers



*************************************************************************************************
On Error Resume Next

Const ForReading = 1
Const HKEY_LOCAL_MACHINE = &H80000002
x = 2

'Create an Excel Work Sheet

Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
objExcel.Workbooks.Add

objExcel.Cells(1, 1).Value = "Machine Name"
objExcel.Cells(1, 2).Value = "Product"
objExcel.Cells(1, 3).Value = "McAfee Version"
objExcel.Cells(1, 4).Value = "McAfee Scan Engine"
objExcel.Cells(1, 5).Value = "Virus Definition"
objExcel.Cells(1, 6).Value = "Virus Definition Date"
objExcel.Cells(1, 7).Value = "Report Time Stamp"

objExcel.Range("A1:G1").Select
objExcel.Selection.Interior.ColorIndex = 19
objExcel.Selection.Font.ColorIndex = 11
objExcel.Selection.Font.Bold = True
objExcel.Cells.EntireColumn.AutoFit


'Read machine names from a txt file

Set Fso = CreateObject("Scripting.FileSystemObject")
Set InputFile = fso.OpenTextFile("MachineList.Txt")
Do While Not (InputFile.atEndOfStream)
strComputer = InputFile.ReadLine

intRow = x

objExcel.Cells(intRow, 1).Value = strComputer

GetRegInfo

objExcel.Cells(intRow, 7).Value = Now()

set strValue1 = Nothing
set strValue2 = Nothing
set strValue3 = Nothing
set strValue4 = Nothing
set strValue5 = Nothing

x = x + 1

Loop

Wscript.Echo "Done"

'*********************************************************************************************************
'Get information from Registry

Sub GetRegInfo

Set oReg=GetObject( _
"winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Network Associates\TVD\VirusScan Enterprise\CurrentVersion"
strProduct = "Product"
strProductVer = "szProductVer"
strEngineVer = "szEngineVer"
strVirDefVer = "szVirDefVer"
strVirDefDate = "szVirDefDate"


oReg.GetStringValue _
HKEY_LOCAL_MACHINE,strKeyPath,strProduct,strValue1

objExcel.Cells(intRow, 2).Value = strValue1

oReg.GetStringValue _
HKEY_LOCAL_MACHINE,strKeyPath,strProductVer,strValue2

objExcel.Cells(intRow, 3).Value = strValue2

oReg.GetStringValue _
HKEY_LOCAL_MACHINE,strKeyPath,strEngineVer,strValue3

objExcel.Cells(intRow, 4).Value = strValue3

oReg.GetStringValue _
HKEY_LOCAL_MACHINE,strKeyPath,strVirDefVer,strValue4

objExcel.Cells(intRow, 5).Value = strValue4

oReg.GetStringValue _
HKEY_LOCAL_MACHINE,strKeyPath,strVirDefDate,strValue5

objExcel.Cells(intRow, 6).Value = strValue5

End Sub
*************************************************************************************************Start Free Trial
[+][-]01.11.2008 at 04:12AM PST, ID: 20635579

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.11.2008 at 06:05AM PST, ID: 20636297

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.11.2008 at 06:33AM PST, ID: 20636577

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: VB Script
Tags: vbscript
Sign Up Now!
Solution Provided By: ubig
Participating Experts: 1
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628