Avatar of ptbuzzcut
ptbuzzcut
Flag for United States of America asked on

Needing vb script help and solution

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?  
 
nse.SendQueued

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

nse.SendQueued
FINAL_COPYSimpler-case-getting-the-s.txt
VB Script

Avatar of undefined
Last Comment
sirbounty

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
sirbounty

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ptbuzzcut

ASKER
Thank you for this.  Working perfectly
sirbounty

Glad I could help. :^)
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck