Friday, November 19, 2010

Generate a list of installed programs to Access using VB script?

Hi,



I am trying to generate a list of programs that appear in my Add/Remove Programs list and create a list of these programs in Access. I have the script which generates a list to Excel but want to change it to Access. I am using VB.



Can anyone help me figure out how to change it?



Thanks.Generate a list of installed programs to Access using VB script?
Why not just link the Excel spreadsheet to your Access database?Generate a list of installed programs to Access using VB script?
This shows you how to get the list and put it into a list control, it'll show you how to get the list itself.

http://www.tek-tips.com/viewthread.cfm?q鈥?/a>



To get it into Access you'll need to create and Access database with an appropriate table.



This page discusses how to use an Access Database from VB.http://www.vbexplorer.com/VBExplorer/vb_鈥?/a>
Retrieve the list of programs from the registry and store them in an array, say strMyPrograms(100). Then open an ADO recordset using ADO Connection and Command variables and the table name. Then loop through your array and use recordset.AddNew to save them to your Access table.



For i=1 to intNumberOfPrograms

rs.AddNew

rs.fields(';ProgramName';)=strMyPrograms鈥?br>
rs.Update

Next i

No comments:

Post a Comment