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