problems with logon script in win95/98 
Author Message
 problems with logon script in win95/98

I am using a VBScript with wsh in a logon script to an NT domain.  The
script gets the user login name using the wsh network object then uses the
object again to map a drive H: to \\servername\username$.   When I try using
the script on a 95/98 machine wsh gives me the error that the method was not
completed because the user had not logged on to the network.  The script
works fine on an NT machine but I don't need it on an NT machine because I
can use the %username% environment variable.

I have tried putting a delay in the script to see if the network logon was
slow but this did not work.  The documentation concerning wsh and win 95/98
machines is pretty scarce, even though I think wsh could solve some network
admin problems with those machines.

Does anyone have an idea what is going on?



Wed, 11 Jul 2001 03:00:00 GMT  
 problems with logon script in win95/98

  In the discussion lounge on my site we came up with the cause and solution for this problem.

  Marcus kellerman wrote on the DL
    "The real problem here stems from the fact that when a Windows 95 machine "logins" to an NT domain the user doesn't actually authenticate until they use an NT Domain resource. So by call net
    prior to calling the .vbs login script file you are authenticating the user to the domain."

  We figured out a work around. I may not be optimal but it works. If you are wrapping your vbscript in a dos batch file you can place a single net use command at the start of the batch then use cscript to run your vbscript. Something like this

    net use \\server\share   'note this does not assign a drive letter but it authenticates the user
    cscript username.vbs

  Clarence

  Check it out..

  Http://cwashington.netreach.net

  On this site you will find resources for all of your scripting needs. Everything you need to get up and running. Over 100 Sample Scripts, ActiveX controls, reference materials, and technical support via an online discussion lounge.

  [ Win32Scripting... automate!! ]

I am using a vbscript with wsh in a logon script to an NT domain.  The
script gets the user login name using the wsh network object then uses the
object again to map a drive H: to \\servername\username$.   When I try using
the script on a 95/98 machine wsh gives me the error that the method was not
completed because the user had not logged on to the network.  The script
works fine on an NT machine but I don't need it on an NT machine because I
can use the %username% environment variable.

I have tried putting a delay in the script to see if the network logon was
slow but this did not work.  The documentation concerning wsh and win 95/98
machines is pretty scarce, even though I think wsh could solve some network
admin problems with those machines.

Does anyone have an idea what is going on?



Wed, 11 Jul 2001 03:00:00 GMT  
 problems with logon script in win95/98

I have tried that work around and I still get the error message "The operation being requested cannot execute because the user has not logged on to the network" Any Suggestions??

        In the discussion lounge on my site we came up with the cause and solution for this problem.

        Marcus kellerman wrote on the DL
            "The real problem here stems from the fact that when a Windows 95 machine "logins" to an NT domain the user doesn't actually authenticate until they use an NT Domain resource. So by call net
            prior to calling the .vbs login script file you are authenticating the user to the domain."

        We figured out a work around. I may not be optimal but it works. If you are wrapping your vbscript in a dos batch file you can place a single net use command at the start of the batch then use cscript to run your vbscript. Something like this

            net use \\server\share   'note this does not assign a drive letter but it authenticates the user
            cscript username.vbs

        Clarence

        Check it out..

        Http://cwashington.netreach.net

        On this site you will find resources for all of your scripting needs. Everything you need to get up and running. Over 100 Sample Scripts, ActiveX controls, reference materials, and technical support via an online discussion lounge.

        [ Win32Scripting... automate!! ]


    I am using a vbscript with wsh in a logon script to an NT domain.  The
    script gets the user login name using the wsh network object then uses the
    object again to map a drive H: to \\servername\username$.   When I try using
    the script on a 95/98 machine wsh gives me the error that the method was not
    completed because the user had not logged on to the network.  The script
    works fine on an NT machine but I don't need it on an NT machine because I
    can use the %username% environment variable.

    I have tried putting a delay in the script to see if the network logon was
    slow but this did not work.  The documentation concerning wsh and win 95/98
    machines is pretty scarce, even though I think wsh could solve some network
    admin problems with those machines.

    Does anyone have an idea what is going on?



Thu, 12 Jul 2001 03:00:00 GMT  
 problems with logon script in win95/98

Quote:
> I am using a vbscript with wsh in a logon script to an NT domain.  The
> script gets the user login name using the wsh network object then uses the
> object again to map a drive H: to \\servername\username$.   When I try
using
> the script on a 95/98 machine wsh gives me the error that the method was
not
> completed because the user had not logged on to the network.  The script
> works fine on an NT machine but I don't need it on an NT machine because I
> can use the %username% environment variable.

> I have tried putting a delay in the script to see if the network logon was
> slow but this did not work.  The documentation concerning wsh and win
95/98
> machines is pretty scarce, even though I think wsh could solve some
network
> admin problems with those machines.

> Does anyone have an idea what is going on?

You have to wrap the username request in a while loop with error checking
turned off.  Here is a snippet of code I use that works on the 95 machines
here:

  Set WSHNetwork = WScript.CreateObject("WScript.Network")

  On Error Resume Next

  While strUName = ""
    strUName = WSHNetwork.UserName
  Wend



Tue, 17 Jul 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Diable the Win95/98 useless logon.

2. Script to gather Client Info win95/98/nt/2000

3. How to get logon name while processing login script in windows 98

4. Logon Script won't run in Windows 98

5. Logon Script (.vbs) will not run on 98.

6. ps dump from win95/98

7. VBScript and Win95/98

8. Finding if Win95 or 98

9. Using Common Dialogs with Win95/98

10. Login script problem in 95/98

11. Problem with scripting ATL 7.0 ActiveX Control under Windows 98

12. Vbscript Login script problems with Nt/98

 

 
Powered by phpBB® Forum Software