Solved

vbscript to create object with octetlist property

Posted on 2002-07-12
6
320 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

710 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