Getting ADSI commands to run in Windows 95 
Author Message
 Getting ADSI commands to run in Windows 95

The error you are getting implies that ADSI is not correctly installed...

--
Michael Harris
MVP Scripting

Please help,

    Does anybody out there know how to get the 'GetObject' method from ADSI
to run in a Windows 95 login script?  I've installed ADS95.exe and it's
running WSH 5.1.  I had a similar problem with my NT clients and fixed that
by running ads.exe.  For some reason the same fix isn't working for Windows
95.

' Check for group Membership
Set User = GetObject("WinNT://example/" & UserAccount)
' Case statements must be in this order for correct connectivity
For Each member in User.Groups
  GName=member.name
....

    I get the following error message when it attempts to run the above
code:
        Error:       File name or class name not found during Automation
operation: 'GetObject"
        Code:      800A01B0
        Source:   Microsoft VBScript runtime error

    It seems to me that it doesn't recognize GetObject as anything other
than the standard automation command.

    If anybody can help with this, I'd love to hear from you.

Thanks in Advance,

Keryn Carruthers
Frustrated Coder



Fri, 13 Dec 2002 03:00:00 GMT  
 Getting ADSI commands to run in Windows 95
The Win95 download is still there...

Active Directory Services Interfaces 2.5 : [Microsoft Windows NT Server 4.0; ADSI 2.5.]
http://www.microsoft.com/ntserver/nts/downloads/other/ADSI25/default.asp

--
Michael Harris
MVP Scripting

Michael,
    Thanks for the response.  I've checked my installation and it doesn't
throw any errors.  As far as I can see it installs cleanly.  I have noticed
that ADS95.exe seems to have disappeared from the Microsoft site.  Maybe
there is an issue with it?

    Let me know if you think of anything else that could be causing it.

Regards,

Keryn C.

____________________________________________________________________

Quote:

>The error you are getting implies that ADSI is not correctly installed...

>--
>Michael Harris
>MVP Scripting




Quote:
>Please help,

snipped


Fri, 13 Dec 2002 03:00:00 GMT  
 Getting ADSI commands to run in Windows 95
In:

Set User = GetObject("WinNT://example/" & UserAccount)

are you sure the domain name and useraccount are correct?

If you are getting either from the WshNetwork object on Win95 during logon, check the following KB
articles:

Q188602 - INFO: UserDomain Method Does Not Work Under Win95 with WSH
http://support.microsoft.com/support/kb/articles/Q188/6/02.ASP

Q233976 - Cannot Retrieve UserName Property in Windows Script Host
http://support.microsoft.com/support/kb/articles/Q233/9/76.ASP
(Note: The "fix" neglects to show that On Error Resume Next is needed)

--
Michael Harris
MVP Scripting

Please help,

    Does anybody out there know how to get the 'GetObject' method from ADSI
to run in a Windows 95 login script?  I've installed ADS95.exe and it's
running WSH 5.1.  I had a similar problem with my NT clients and fixed that
by running ads.exe.  For some reason the same fix isn't working for Windows
95.

' Check for group Membership
Set User = GetObject("WinNT://example/" & UserAccount)
' Case statements must be in this order for correct connectivity
For Each member in User.Groups
  GName=member.name
....

    I get the following error message when it attempts to run the above
code:
        Error:       File name or class name not found during Automation
operation: 'GetObject"
        Code:      800A01B0
        Source:   Microsoft VBScript runtime error

    It seems to me that it doesn't recognize GetObject as anything other
than the standard automation command.

    If anybody can help with this, I'd love to hear from you.

Thanks in Advance,

Keryn Carruthers
Frustrated Coder



Fri, 13 Dec 2002 03:00:00 GMT  
 Getting ADSI commands to run in Windows 95
Please help,

    Does anybody out there know how to get the 'GetObject' method from ADSI
to run in a Windows 95 login script?  I've installed ADS95.exe and it's
running WSH 5.1.  I had a similar problem with my NT clients and fixed that
by running ads.exe.  For some reason the same fix isn't working for Windows
95.

' Check for group Membership
Set User = GetObject("WinNT://example/" & UserAccount)
' Case statements must be in this order for correct connectivity
For Each member in User.Groups
  GName=member.name
....

    I get the following error message when it attempts to run the above
code:
        Error:       File name or class name not found during Automation
operation: 'GetObject"
        Code:      800A01B0
        Source:   Microsoft VBScript runtime error

    It seems to me that it doesn't recognize GetObject as anything other
than the standard automation command.

    If anybody can help with this, I'd love to hear from you.

Thanks in Advance,

Keryn Carruthers
Frustrated Coder



Sat, 14 Dec 2002 03:00:00 GMT  
 Getting ADSI commands to run in Windows 95
Michael,
    Thanks for the response.  I've checked my installation and it doesn't
throw any errors.  As far as I can see it installs cleanly.  I have noticed
that ADS95.exe seems to have disappeared from the Microsoft site.  Maybe
there is an issue with it?

    Let me know if you think of anything else that could be causing it.

Regards,

Keryn C.

____________________________________________________________________

Quote:

>The error you are getting implies that ADSI is not correctly installed...

>--
>Michael Harris
>MVP Scripting




Quote:
>Please help,

snipped


Sat, 14 Dec 2002 03:00:00 GMT  
 Getting ADSI commands to run in Windows 95
Thanks Michael,

    I lost it.  Still have the same problem though, even with a fresh
install of a new copy of ads95.exe.

    I'll keep trying though.

Regards,

Keryn C.

Quote:

>The Win95 download is still there...

>Active Directory Services Interfaces 2.5 : [Microsoft Windows NT Server
4.0; ADSI 2.5.]
>http://www.microsoft.com/ntserver/nts/downloads/other/ADSI25/default.asp

>--
>Michael Harris
>MVP Scripting




Quote:
>Michael,
>    Thanks for the response.  I've checked my installation and it doesn't
>throw any errors.  As far as I can see it installs cleanly.  I have noticed
>that ADS95.exe seems to have disappeared from the Microsoft site.  Maybe
>there is an issue with it?

>    Let me know if you think of anything else that could be causing it.

>Regards,

>Keryn C.

>____________________________________________________________________

>>The error you are getting implies that ADSI is not correctly installed...

>>--
>>Michael Harris
>>MVP Scripting



>>Please help,

>snipped



Sat, 14 Dec 2002 03:00:00 GMT  
 Getting ADSI commands to run in Windows 95
I'm as much in the dark as you ;-(...

On my Win98 box there is there is the key

HKEY_CLASSES_ROOT\WinNT\Clsid

which defines the handler for the "WinNT" COM moniker used in the GetObject call...

Beyond that, I don't have a clue.

Try a test script that just does

set obj = getobject("WinNT:")
msgbox typename(obj)

which should display "Object" (or crash ;-)...

--
Michael Harris
MVP Scripting


Michael,

    All of those details are correct.  I'm thinking at this point that it
may be a registry setting that isn't written properly.  You wouldn't happen
to know which registry settings are written by the installation process
would you?

    I guess I'll just have to sit down and do a comparison between NT and 95
and hope that some of the settings correspond.

    Once more, thanks for your help.

Regards,

Keryn Carruthers

Quote:

>In:

>Set User = GetObject("WinNT://example/" & UserAccount)

>are you sure the domain name and useraccount are correct?

>If you are getting either from the WshNetwork object on Win95 during logon,

check the following KB
Quote:
>articles:

>Q188602 - INFO: UserDomain Method Does Not Work Under Win95 with WSH
>http://support.microsoft.com/support/kb/articles/Q188/6/02.ASP

>Q233976 - Cannot Retrieve UserName Property in Windows Script Host
>http://support.microsoft.com/support/kb/articles/Q233/9/76.ASP
>(Note: The "fix" neglects to show that On Error Resume Next is needed)

>--
>Michael Harris
>MVP Scripting

snipped


Sat, 14 Dec 2002 03:00:00 GMT  
 Getting ADSI commands to run in Windows 95
Michael,

    All of those details are correct.  I'm thinking at this point that it
may be a registry setting that isn't written properly.  You wouldn't happen
to know which registry settings are written by the installation process
would you?

    I guess I'll just have to sit down and do a comparison between NT and 95
and hope that some of the settings correspond.

    Once more, thanks for your help.

Regards,

Keryn Carruthers

Quote:

>In:

>Set User = GetObject("WinNT://example/" & UserAccount)

>are you sure the domain name and useraccount are correct?

>If you are getting either from the WshNetwork object on Win95 during logon,

check the following KB
Quote:
>articles:

>Q188602 - INFO: UserDomain Method Does Not Work Under Win95 with WSH
>http://support.microsoft.com/support/kb/articles/Q188/6/02.ASP

>Q233976 - Cannot Retrieve UserName Property in Windows Script Host
>http://support.microsoft.com/support/kb/articles/Q233/9/76.ASP
>(Note: The "fix" neglects to show that On Error Resume Next is needed)

>--
>Michael Harris
>MVP Scripting

snipped


Sun, 15 Dec 2002 03:00:00 GMT  
 Getting ADSI commands to run in Windows 95
"...Let me know if you've had any sudden brain waves...."

I have those all the time - if I walk away from the keyboard, it usually clears up after a while
;-)...

--
Michael Harris
MVP Scripting

Checked that setting.  It seems fine.  Ran the little test and it did it
properly (popped up "object" as requested).

It still threw an error when trying to attach to the nt account though.  I'm
just about out of ideas (and this is supposed to be working by today).  Let
me know if you've had any sudden brain waves.

Thanks,

Keryn C.

Quote:

>I'm as much in the dark as you ;-(...

>On my Win98 box there is there is the key

>HKEY_CLASSES_ROOT\WinNT\Clsid

>which defines the handler for the "WinNT" COM moniker used in the GetObject
call...

>Beyond that, I don't have a clue.

>Try a test script that just does

>set obj = getobject("WinNT:")
>msgbox typename(obj)

>which should display "Object" (or crash ;-)...

>--
>Michael Harris
>MVP Scripting

SNIPPED


Sun, 15 Dec 2002 03:00:00 GMT  
 Getting ADSI commands to run in Windows 95
I'm going to have to defer to someone with more 1st hand ADSI and NT security experience (like maybe
Clarence, Ian, or Shawn just to name a few ;-)...

--
Michael Harris
MVP Scripting

That's terribly helpful!

I've narrowed the problem down to it looking at NT accounts.  It doesn't
have any problems at the WinNT://domain level, just at the NT account level.
I don't suppose there is a registry entry for that that you know of?  I
can't see any reason why this won't work.  And I'm about to pull my hair out
(:-))!

Regards,

KC

Quote:

>"...Let me know if you've had any sudden brain waves...."

>I have those all the time - if I walk away from the keyboard, it usually

clears up after a while
Quote:
>;-)...

>--
>Michael Harris
>MVP Scripting

snipped


Sun, 15 Dec 2002 03:00:00 GMT  
 Getting ADSI commands to run in Windows 95
Checked that setting.  It seems fine.  Ran the little test and it did it
properly (popped up "object" as requested).

It still threw an error when trying to attach to the nt account though.  I'm
just about out of ideas (and this is supposed to be working by today).  Let
me know if you've had any sudden brain waves.

Thanks,

Keryn C.

Quote:

>I'm as much in the dark as you ;-(...

>On my Win98 box there is there is the key

>HKEY_CLASSES_ROOT\WinNT\Clsid

>which defines the handler for the "WinNT" COM moniker used in the GetObject
call...

>Beyond that, I don't have a clue.

>Try a test script that just does

>set obj = getobject("WinNT:")
>msgbox typename(obj)

>which should display "Object" (or crash ;-)...

>--
>Michael Harris
>MVP Scripting

SNIPPED


Mon, 16 Dec 2002 03:00:00 GMT  
 Getting ADSI commands to run in Windows 95
That's terribly helpful!

I've narrowed the problem down to it looking at NT accounts.  It doesn't
have any problems at the WinNT://domain level, just at the NT account level.
I don't suppose there is a registry entry for that that you know of?  I
can't see any reason why this won't work.  And I'm about to pull my hair out
(:-))!

Regards,

KC

Quote:

>"...Let me know if you've had any sudden brain waves...."

>I have those all the time - if I walk away from the keyboard, it usually

clears up after a while
Quote:
>;-)...

>--
>Michael Harris
>MVP Scripting

snipped


Mon, 16 Dec 2002 03:00:00 GMT  
 Getting ADSI commands to run in Windows 95
The issue you're seeing is that under Win9x, the user isn't actually logged
on until after the logon script runs.  What you'll need to do is a loop that
checks to see if the logged on user info returns null.  If so, sleep for a
second, and try again.  Loop until the logged on user is not null.  Sample
code follows, compliments of Gunter Born, as posted a couple weeks ago.

Thanks,

Joe

Set oWSHShell = WScript.CreateObject ("WScript.Network")
name = ""
Do While name = ""
   name = oWSHShell.UserName ' query user name
   WScript.Sleep 200 ' suspend 200 milliseconds to lower CPU load
End


Quote:
> Please help,

>     Does anybody out there know how to get the 'GetObject' method from
ADSI
> to run in a Windows 95 login script?  I've installed ADS95.exe and it's
> running WSH 5.1.  I had a similar problem with my NT clients and fixed
that
> by running ads.exe.  For some reason the same fix isn't working for
Windows
> 95.

> ' Check for group Membership
> Set User = GetObject("WinNT://example/" & UserAccount)
> ' Case statements must be in this order for correct connectivity
> For Each member in User.Groups
>   GName=member.name
> ....

>     I get the following error message when it attempts to run the above
> code:
>         Error:       File name or class name not found during Automation
> operation: 'GetObject"
>         Code:      800A01B0
>         Source:   Microsoft VBScript runtime error

>     It seems to me that it doesn't recognize GetObject as anything other
> than the standard automation command.

>     If anybody can help with this, I'd love to hear from you.

> Thanks in Advance,

> Keryn Carruthers
> Frustrated Coder



Mon, 16 Dec 2002 03:00:00 GMT  
 Getting ADSI commands to run in Windows 95
All,

    You'll be pleased to know that I fixed the problem.  All it took was the
installation of DSCLIENT.exe off the Windows 2000 server CD.  The only down
side to this is that there is now a 20 second delay before it starts
processing the logon script.  Any ideas on this issue?

Regards,

Keryn Carruthers
Happy Coder

Quote:

>Please help,

>    Does anybody out there know how to get the 'GetObject' method from ADSI
>to run in a Windows 95 login script?  I've installed ADS95.exe and it's
>running WSH 5.1.  I had a similar problem with my NT clients and fixed that
>by running ads.exe.  For some reason the same fix isn't working for Windows
>95.

>' Check for group Membership
>Set User = GetObject("WinNT://example/" & UserAccount)
>' Case statements must be in this order for correct connectivity
>For Each member in User.Groups
>  GName=member.name
>....

>    I get the following error message when it attempts to run the above
>code:
>        Error:       File name or class name not found during Automation
>operation: 'GetObject"
>        Code:      800A01B0
>        Source:   Microsoft VBScript runtime error

>    It seems to me that it doesn't recognize GetObject as anything other
>than the standard automation command.

>    If anybody can help with this, I'd love to hear from you.

>Thanks in Advance,

>Keryn Carruthers
>Frustrated Coder



Sat, 21 Dec 2002 03:00:00 GMT  
 
 [ 14 post ] 

 Relevant Pages 

1. Getting ADSI commands to run in Windows 95

2. ADSI and Windows 98 / 95

3. ADSI Security under Windows 95

4. ADSI and Windows 98 / 95

5. Windows 95/NT clients & ADSI

6. Lasermaster getting goblins treatment from Windows 95

7. vbscript login scripts - starting a script from the Windows 95 command prompt

8. Problem using wsh.run method in 95 with really long command

9. Problem using wsh.run in 95 with really long command

10. Encripted Script file run on Windows 95

11. WSH not running on Windows 95???

12. Running vbs as a login script for Windows 95

 

 
Powered by phpBB® Forum Software