Solved

vbscript to create object with octetlist property

Posted on 2002-07-12
6
325 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses
Course of the Month8 days, 9 hours left to enroll

615 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