Solved

vbscript to create object with octetlist property

Posted on 2002-07-12
6
296 Views
Last Modified: 2013-11-26
When writing a vbscript to create an application object, I encountered a small problem. How do I read/write octet lists in vbscript.

Can you tell me what should be on the place of the questionmarks in order to write the octet list value.

Set oNwDir = WScript.CreateObject("NWDirLib.NWDirCtrl.1")
oNWDir.FullName="NDS:\\tree\company\context\container"
set oMyEntry = oNWDir.Entries.Add("App:Application","AppObjName")
oMyEntry.SetFieldValue "App:Caption","Test App Obj"
oMyEntry.SetFieldValue "App:Path","203437204E554C4C20"
oMyEntry.LoadFieldValueFromFile "App:Startup Script","c:\temp\sscript.txt"
oMyEntry.?????? "App:Fs Rights Path","octet list data"
oMyEntry.Update

If you are not familiar with Netware, you could do the same with an LDAP:// thing. Problem is just that the "octet list" can not be set or get with SetFieldValue or LoadFieldValueFromFile.
0
Comment
Question by:TNC0292
6 Comments
 
LVL 3

Expert Comment

by:Gunsen
ID: 7148544
The directory object should probably be handled using other object, not the DirCtrl since it is of no relevance for the directory itself.

Maybe you should try "NWAppAdmLib.NWAppAdmCtrl.1"

However to read object data:
Set octetList = oMyEntry.GetFieldValue("App:Fs Rights Path")
theArray = octetList.Data
For i= LBound(theArray) to UBound(theArray)
  ' theArray(i) holds each element
Next
0
 

Author Comment

by:TNC0292
ID: 7148592
Set octetList = oMyEntry.GetFieldValue("App:Fs Rights Path")
returns the error:
can not get or set this field
and "NWAppAdmLib.NWAppAdmCtrl.1" does not have a property or method to approach the required object
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7149527
Learning...
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:TNC0292
ID: 7149539
If you can do it in VBA it would be nice as well
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8002366
Hi TNC0292,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Refund points and save as a 0-pt PAQ.

TNC0292, Please DO NOT accept this comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit.  Explain why.
==========
DanRollins -- EE database cleanup volunteer
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 8095358
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
DO Loop not working 4 72
Opening Remote & Local Data Connection 2 52
Search combo error "Data Type Mismatch in Criteria Expression" 2 53
Problem to With line 4 43
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now