troubleshooting Question

Needing vb script help and solution

Avatar of ptbuzzcut
ptbuzzcutFlag for United States of America asked on
VB Script
3 Comments1 Solution95 ViewsLast Modified:
I do not know scripting, so-
Have looked at many samples people online have provided and finally have a sript that gives me what I am trying to collect and write to a db.
Need HKCU\Network subkeys and  stringvalueName RemotePath and its' value. For example what I want would be   L:  and \\servername\path(share)
The attached has more code probably than needed, but it does give me a drive letter and the path. I did not write this but used  what I could find to get to this point.
 Problem is the second part of the script where it needs to write to the db.   It either writes one line of data or only one part of.  
I do not know what needs to be entered  as I will also get invalid data type.
Also, instead of getting all of the mapped drives ( which it does get and echo so I am sure), it also appears I am only getting the last.
The part to write to the db is fairly standard :

'Create Inventory data block. Here assumption is that the data class with below guid is already configured on server
dim objDCInstance
set objDCInstance = nse.AddDataClass ("{e30cf469-1720-4452-b3bc-7248d42a861a}")

dim objDataClass
set objDataClass = nse.AddDataBlock (objDCInstance)

'Add a new row
dim objDataRow
set objDataRow = objDataClass.AddRow
'Set columns
objDataRow.SetField 0,  what is the data that goes here?  Name?    

objDataRow.SetField 1,  what is the data that goes here? Name?  

For example. another custom inventory that is working uses
  dwValue for SetField 0

'Add a new row
dim objDataRow
set objDataRow = objDataClass.AddRow
'Set columns
objDataRow.SetField 0, dwValue

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros