WSH script to read remote registry key/subkey

A how-to code example from ASPFree.

Contributed by
Rating: 2 stars2 stars2 stars2 stars2 stars / 67
April 06, 2003
Rate this Article:
MEH MEH++


SEARCH ASP FREE
TOOLS YOU CAN USE

advertisement

Const ForReading 1ForWriting 2ForAppending 8

dim conn
rsfsofobjMenuPagestrsql

Set conn 
createobject("adodb.connection")
conn.open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:inetpubwwwrootdb1.mdb"

strsql "select * from table1"

set rs createobject("adodb.recordset")
rs.open strsqlconn

Set objFSO 
CreateObject("Scripting.FileSystemObject")

strFileName "c:inetpubwwwrootusers.txt"
Set objMenuPage objFSO.opentextFile(strFileNameforWritingTrue)

Do While 
NOT RS.EOF
    objMenuPage
.write "ID:" rs(0) & vbcrlf
    objMenuPage
.write "Field1:" rs(1) & vbcrlf
    objMenuPage
.write "Field2:" rs(2) & vbcrlf
rs
.movenext
Loop

objMenuPage
.WriteLine
objMenuPage
.Close
rs
.close
conn
.close
set rs 
nothing
set conn 
nothing
set objFSO 
nothing
set objMenuPage

blog comments powered by Disqus
WINDOWS SCRIPTING ARTICLES

- More Windows Scripting Workarounds from Nilpo
- Overloading Methods and More in VBScript
- Improving MFC for Windows Vista
- Regular Expressions in VBScript
- Working with Dates in WMI
- Completing Calendars with VBScript Date Func...
- Building Calendars with VBScript Date Functi...
- Working With Dates and Times in VBScript
- Designing WCF DataContract Classes Using the...
- Understanding Dates and Times in VBScript
- Working With Arrays in VBScript
- Compressed Folders in WSH
- Using .NET Interops in VBScript
- Nilpo`s Scripting Secrets, Vol I
- Database operations using Silverlight 2.0 WC...

ASP Web Hosting ASP.Net Web Hosting Windows Web Hosting
 
 
 

ASP Free Forums 
 RSS  Tutorials RSS
 RSS  Forums RSS
 RSS  All Feeds
Site Map 
Request Media Kit
Write For Us Get Paid 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Privacy Policy 
Support 


© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 9 - Follow our Sitemap
Most Popular Topics
All ASP.Net Tutorials