Solved

vbscript to create object with octetlist property

Posted on 2002-07-12
6
312 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Adding to a VBA? 6 76
How to make an ADE file by code? 11 93
clicking a shape in a frame array vb6 3 46
VBA: Insert New column with specific format type 12 38
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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.
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…

792 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