How can I change the code to give the output in exel sheet or text file.
The code look like this: - Const HKLM = &H80000002 'HKEY_LOCAL_MACHINE
-
strComputer = "."
-
strKey = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"
-
strEntry1a = "DisplayName"
-
strEntry1b = "QuietDisplayName"
-
strEntry2 = "InstallDate"
-
strEntry3 = "VersionMajor"
-
strEntry4 = "VersionMinor"
-
strEntry5 = "EstimatedSize"
-
-
Set objReg = GetObject("winmgmts://" & strComputer & _
-
"/root/default:StdRegProv")
-
objReg.EnumKey HKLM, strKey, arrSubkeys
-
WScript.Echo "Installed Applications" & VbCrLf
-
For Each strSubkey In arrSubkeys
-
intRet1 = objReg.GetStringValue(HKLM, strKey & strSubkey, _
-
strEntry1a, strValue1)
-
If intRet1 <> 0 Then
-
objReg.GetStringValue HKLM, strKey & strSubkey, _
-
strEntry1b, strValue1
-
End If
-
If strValue1 <> "" Then
-
WScript.Echo VbCrLf & "Display Name: " & strValue1
-
End If
-
objReg.GetStringValue HKLM, strKey & strSubkey, _
-
strEntry2, strValue2
-
If strValue2 <> "" Then
-
WScript.Echo "Install Date: " & strValue2
-
End If
-
objReg.GetDWORDValue HKLM, strKey & strSubkey, _
-
strEntry3, intValue3
-
objReg.GetDWORDValue HKLM, strKey & strSubkey, _
-
strEntry4, intValue4
-
If intValue3 <> "" Then
-
WScript.Echo "Version: " & intValue3 & "." & intValue4
-
End If
-
objReg.GetDWORDValue HKLM, strKey & strSubkey, _
-
strEntry5, intValue5
-
If intValue5 <> "" Then
-
WScript.Echo "Estimated Size: " & Round(intValue5/1024, 3) & " megabytes"
-
End If
-
Next
1 1841
If I'm right u r trying to print out the info read from a registry section, if u write it with a comma separated format and name it foobar.csv u should be good to go as excel will read it in. More esoteric if u open an Excel object and play with the methods but this has worked for numerous requests I had i the past.
Just open a file for writing and carry on looping thru your hit-results
Ciao
Becker
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Martijn van Exel |
last post by:
Hi all,
I'm receiving output from a webservice formatted as follows:
<?xml version="1.0" encoding="utf-8"?>
<DataSet xmlns="http://tempuri.org/adrloc/levering">
<xs:schema...
|
by: Tom |
last post by:
> > Ciao a tutto il NG.
> > Access 97
> > Devo poter inserire un record vuoto in una maschera a schede continua
> cioč.
> > record 1
> > record 2
> > record 3
> > record 4
> > record 5
> >...
|
by: Hendri |
last post by:
My company have any report with ms exel , My question is how to make a web
application with asp.net that can join with all office fitur. and i want to
save the spread sheet by day, so if my boss...
|
by: Sylvain GENTIN |
last post by:
Hi
I try to bring back to exel a string computed by VB macro
function.
---------------------------------------------------------
Function CameoFilter(FileName As String, ByRef TextLine As...
|
by: newbie |
last post by:
i'm a newbie of c language.
can anyone help me to implement the code so that I can get the
ciphertext from the output.
thanks.
#ifndef _3DES_H
#define _3DES_H
#ifndef uint8
#define uint8 ...
|
by: hatric |
last post by:
HI i am novice to EXel and now using it, but i hav some probles in using it as database plz help
viz. i am gettiing data from my colugues in exel form weekly basis and merg them in one exel sheet...
|
by: shahpalakr |
last post by:
How we can do the connectivity of .Net to Exel.
Please give me some basic consept abt this like basic syntax.
Thanks.
|
by: chris01 |
last post by:
I am tired of building tables from scratch in html and want to know if there is a way to build an exel document and somehow imbed the table into the html, either through php or java.
I dont want...
|
by: aramya |
last post by:
i have to transfer an image and data from the exel sheet to power point slide using visual basic. can anyone please help how it can be done
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |