Solved

vbscript to create object with octetlist property

Posted on 2002-07-12
6
286 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
Comment Utility
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
Comment Utility
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
Comment Utility
Learning...
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

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

Expert Comment

by:DanRollins
Comment Utility
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
Comment Utility
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
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…

762 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

13 Experts available now in Live!

Get 1:1 Help Now