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 1846
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 id="Bridgis_DataSet" xmlns=""
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-
microsoft-com:xml-msdata">
<xs:element name="Bridgis_DataSet"...
|
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
> > record 6
|
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 want to see a Tommorow Reports
he can see it , sama like Crystal report ...?maybe that alls thanks....
|
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
Variant)
....
TextLine = ...
End Function
---------------------------------------------------------
|
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 unsigned char
#endif
| |
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 manualy , can i import and link many exel files data in one master file, plz suggest
thanks
hatric
|
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 to put a link, or open the exel file in a new window, I want it to look like it is part of the website.
Any help would be apprecieated
|
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: 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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |