Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > for loop on this

Reply
Thread Tools Display Modes

for loop on this

 
 
joey
Guest
Posts: n/a

 
      10-01-2008
How do i change this script to use a loop

On Error Resume Next

Set objUser = GetObject _
("LDAP://localhost:51008/KEY=xxx,key=Services,key=Configuration,key=yyy,key =zzz,CN=aaa,DC=site0000001,DC=domain,DC=com")
objUser.Put "KeyValueString", "bbb"
objUser.SetInfo

Set objUser = GetObject _
("LDAP://localhost:51008/key=qqq,key=Services,key=Configuration,key=yyy,key =zzz,CN=aaa,DC=site0000001,DC=domain,DC=com")
objUser.Put "KeyValueString", "bbb"
objUser.SetInfo




 
Reply With Quote
 
 
 
 
Pegasus \(MVP\)
Guest
Posts: n/a

 
      10-01-2008

"joey" <> wrote in message
news:...
> How do i change this script to use a loop
>
> On Error Resume Next
>
> Set objUser = GetObject _
>
> ("LDAP://localhost:51008/KEY=xxx,key=Services,key=Configuration,key=yyy,key =zzz,CN=aaa,DC=site0000001,DC=domain,DC=com")
> objUser.Put "KeyValueString", "bbb"
> objUser.SetInfo
>
> Set objUser = GetObject _
>
> ("LDAP://localhost:51008/key=qqq,key=Services,key=Configuration,key=yyy,key =zzz,CN=aaa,DC=site0000001,DC=domain,DC=com")
> objUser.Put "KeyValueString", "bbb"
> objUser.SetInfo


You need to tell us what your loop condition is. Do you want to run it
twice? Until a certain condition is met? Until an error is encountered?
Other?


 
Reply With Quote
 
joey
Guest
Posts: n/a

 
      10-01-2008
No the loop is to modify attibutes in ADAM. The attribute keystring modifies
different "KEYS" in ADAM
"Pegasus (MVP)" <> wrote in message
news:...
>
> "joey" <> wrote in message
> news:...
>> How do i change this script to use a loop
>>
>> On Error Resume Next
>>
>> Set objUser = GetObject _
>>
>> ("LDAP://localhost:51008/KEY=xxx,key=Services,key=Configuration,key=yyy,key =zzz,CN=aaa,DC=site0000001,DC=domain,DC=com")
>> objUser.Put "KeyValueString", "bbb"
>> objUser.SetInfo
>>
>> Set objUser = GetObject _
>>
>> ("LDAP://localhost:51008/key=qqq,key=Services,key=Configuration,key=yyy,key =zzz,CN=aaa,DC=site0000001,DC=domain,DC=com")
>> objUser.Put "KeyValueString", "bbb"
>> objUser.SetInfo

>
> You need to tell us what your loop condition is. Do you want to run it
> twice? Until a certain condition is met? Until an error is encountered?
> Other?
>



 
Reply With Quote
 
Richard Mueller [MVP]
Guest
Posts: n/a

 
      10-01-2008
You might get ideas from the Microsoft Script Center section on scripting
ADAM:

http://www.microsoft.com/technet/scr...m/default.mspx

There are scripts that enumerate all attributes of ADAM objects (and their
values). For example:

http://www.microsoft.com/technet/scr.../amlsvb07.mspx

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--

"joey" <> wrote in message
news:...
> No the loop is to modify attibutes in ADAM. The attribute keystring
> modifies different "KEYS" in ADAM
> "Pegasus (MVP)" <> wrote in message
> news:...
>>
>> "joey" <> wrote in message
>> news:...
>>> How do i change this script to use a loop
>>>
>>> On Error Resume Next
>>>
>>> Set objUser = GetObject _
>>>
>>> ("LDAP://localhost:51008/KEY=xxx,key=Services,key=Configuration,key=yyy,key =zzz,CN=aaa,DC=site0000001,DC=domain,DC=com")
>>> objUser.Put "KeyValueString", "bbb"
>>> objUser.SetInfo
>>>
>>> Set objUser = GetObject _
>>>
>>> ("LDAP://localhost:51008/key=qqq,key=Services,key=Configuration,key=yyy,key =zzz,CN=aaa,DC=site0000001,DC=domain,DC=com")
>>> objUser.Put "KeyValueString", "bbb"
>>> objUser.SetInfo

>>
>> You need to tell us what your loop condition is. Do you want to run it
>> twice? Until a certain condition is met? Until an error is encountered?
>> Other?
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to end while Loop Jayakumar Natarajan Windows Vista Drivers 4 06-18-2009 12:18 PM
Do Loop Brtn Windows Vista General Discussion 1 08-16-2008 03:18 PM
Log-In Loop Bryan Utley Windows Vista Installation 0 06-30-2006 12:41 PM
DNS Loop! Help! Joe Williams DNS Server 1 10-31-2005 05:34 PM
Re: Loop with out Do Richard Mueller [MVP] Scripting 0 04-20-2004 01:49 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59