Talk About Network

Google





Software > ADSI General > Re: integer8 at...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 7 of 8 Topic 5327 of 5437
Post > Topic >>

Re: integer8 attributes and updating them in AD

by "Janette" <jtowell@[EMAIL PROTECTED] > Jul 24, 2008 at 10:11 AM

Hi Joe,

Thanks heaps. I didn't realise I could just use a string. For now I will
do 
this, but I will investigate the IADsLargeInteger inteface also so maybe I

can make use of that.

Regards
Janette

"Joe Kaplan" <joseph.e.kaplan@[EMAIL PROTECTED]
> wrote in message 
news:%23T4RRZN7IHA.1468@[EMAIL PROTECTED]
> Sorry for the delay in getting back to you.
>
> For integer8 attributes, you can either set them using an
IADsLargeInteger 
> object or simply set the value with a string.  The latter technique is 
> especially easy to deal with, as long as you can calculate the string 
> value you need.
>
> 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:uLYmaiI6IHA.5012@[EMAIL PROTECTED]
>> 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
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
 




 8 Posts in Topic:
integer8 attributes and updating them in AD
"Janette" <j  2008-07-17 12:47:50 
Re: integer8 attributes and updating them in AD
"Joe Kaplan" &l  2008-07-17 09:53:05 
Re: integer8 attributes and updating them in AD
"Janette" <j  2008-07-18 09:46:26 
Re: integer8 attributes and updating them in AD
"Joe Kaplan" &l  2008-07-17 21:36:10 
Re: integer8 attributes and updating them in AD
"Janette" <j  2008-07-18 13:44:29 
Re: integer8 attributes and updating them in AD
"Joe Kaplan" &l  2008-07-23 10:10:51 
Re: integer8 attributes and updating them in AD
"Janette" <j  2008-07-24 10:11:07 
Re: integer8 attributes and updating them in AD
ravi mehta <rmehta@[EM  2008-09-24 09:28:45 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Thu Jan 8 20:26:50 PST 2009.