Page 1 of 1

ADSystemInfo and ComputerName

Posted: 21 Sep 2009, 14:21
by bryan
Set objSysInfo = CreateObject("ADSystemInfo")
sTmp = objSysInfo.ComputerName
If err <> 0 Then
wsh.echo err.description
End If

This script echos a "Permission Denied" on some machines. I have been unable
to determine the cause. I have re-registered the activeds.dll. Not sure what
else to try. Anyone have any ideas?

Re: ADSystemInfo and ComputerName

Posted: 21 Sep 2009, 19:55
by pegasus [mvp]
"Bryan" <Bryan@discussions.microsoft.com> wrote in message
news:91643121-2DE4-4CA3-9020-832878941917@microsoft.com...
> Set objSysInfo = CreateObject("ADSystemInfo")
> sTmp = objSysInfo.ComputerName
> If err <> 0 Then
> wsh.echo err.description
> End If
>
> This script echos a "Permission Denied" on some machines. I have been
> unable
> to determine the cause. I have re-registered the activeds.dll. Not sure
> what
> else to try. Anyone have any ideas?
>

Best to ask the experts in a VB Script newsgroup, e.g.
public.scripting.vbscript.