Hi,
Thanks Joe. I have been through Richard's resources and I must be missing
something because I can't find anything that helps me with updating
Integer8
values. There is plenty on getting them and working with them, but I want
to
Update things like maxPwdAge to new values using vbscript.
For example if I do try to set the lockoutDuration to 20 minutes by
assigning -12,000,000,000 in a vbs file, I get the error "Unspecified
error"
80004005 on the line with -1200*(1^7)
Set objRootDSE = GetObject("LDAP://RootDSE")
strDNSDomain = objRootDSE.Get("defaultNamingContext")
Set objDomain = GetObject("LDAP://" & strDNSDomain)
objDomain.Put "lockoutDuration", -1200*(1^7)
objDomain.SetInfo
Any ideas around this would be gratefully accepted. If it is at all
possible
I would like to avoid using .NET for now.
Regards
Janette
"Joe Kaplan" <joseph.e.kaplan@[EMAIL PROTECTED]
> wrote in message
news:%23Ef9L8H6IHA.404@[EMAIL PROTECTED]
> Sure, you definitely can. I thought you mentioned ASP.NET in your
> previous post which is why I replied with .NET advice. Sorry if I
didn't
> catch what you were asking.
>
> Integer8 is a little clumsy in VBScript, primarily because it doesn't
> sup****t 64 bit integers or unsigned 32 bit integers, but there are
> numerous well-do***ented workarounds out there that overcome most of
these
> issues.
>
> Richard's resources would be a good place to start on that.
>
> Joe K.
>
> --
> Joe Kaplan-MS MVP Directory Services Programming
> Co-author of "The .NET Developer's Guide to Directory Services
> Programming"
> http://www.directoryprogramming.net
> --
> "Janette" <jtowell@[EMAIL PROTECTED]
> wrote in message
> news:uZsiXdG6IHA.1200@[EMAIL PROTECTED]
>> Hi Joe,
>>
>> Thanks for this information. Last resort I will go down the .NET path,
>> but as I am not very proficient in .NET, and the existing application
>> that I am extending is already written in classic ASP, I was still
>> wondering is it in fact possible to perform an update to Integer8
>> attributes in AD using vbscript?
>>
>> Regards
>> Janette
>>
>> "Joe Kaplan" <joseph.e.kaplan@[EMAIL PROTECTED]
> wrote in
message
>> news:eiXvTzB6IHA.2260@[EMAIL PROTECTED]
>>> We have some nice samples on writing all different types of AD
>>> attributes in .NET in ch 6 of our book (including LargeInteger). If
you
>>> go to the website in my signature, you can download all the code
>>> samples.
>>>
>>> The book chapter contains all the details, but the free sample code
may
>>> be enough.
>>>
>>> The bottom line with large integer is that you have more options in
.NET
>>> because .NET has full sup****t for 64 bit integer types and also has a
>>> bunch of sup****t for converting date/time into 64 bit integers which
>>> makes many of the VBScript hacks somewhat obsolete.
>>>
>>> I hope that helps,
>>>
>>> Joe K.
>>>
>>> --
>>> Joe Kaplan-MS MVP Directory Services Programming
>>> Co-author of "The .NET Developer's Guide to Directory Services
>>> Programming"
>>> http://www.directoryprogramming.net
>>> --
>>> "Janette" <jtowell@[EMAIL PROTECTED]
> wrote in message
>>> news:eLEYCe75IHA.3784@[EMAIL PROTECTED]
>>>> Hi,
>>>>
>>>> I have read Richard Muellers website about treatment of Integer8
>>>> attributes in AD (http://rlmueller.net/Integer8Attributes.htm)
it is
>>>> really useful. I am aware that vbscript doesn't sup****t integer8
unless
>>>> using the IADsLargeInteger interface, which as far as I can gather
can
>>>> only be invoked when "getting" a value from AD. Is there any way
using
>>>> vbscript that one can update an integer8 value in AD 2003 by making
use
>>>> of this interface? More specifically I want to be able to update
>>>> maxPwdAge and minPwdAge via an ASP page, and therefore was going to
be
>>>> using vbscript.
>>>>
>>>> If the answer is no this can't be done in any way using vbcript, is
>>>> there any other way of scripting this kind of update? Would it be any
>>>> different if I was using ASP.NET?
>>>>
>>>> Regards
>>>> Janette
>>>>
>>>
>>>
>>
>>
>
>


|