Login script - Script running before user logs on. 
Author Message
 Login script - Script running before user logs on.

Try this:

While WSHNetwork.UserName = ""
Wend


Quote:
> I am trying to use WSH (cscript.exe) to run login scripts for Win95
clients
> on NT4 server.  The problem I seem to be having is that I can't create a
> User object in the script as the script runs before the user is logged on.

> eg, strUserID = WSHNetwork.UserName

> When I look at the value of strUserID in the de{*filter*} it is always nil.

> The script runs fine if I execute it when already logged on, and I can see
a
> value for strUserID in the de{*filter*}.

> I am using a batch file nominated in the user profile to start "cscript
> loginfile.wsh"

> I remember seeing a reference to this issue in Andrew Clinicks' slide
show,
> but is there any resolution?

> BTW I have tried;

>  Do
>   strUserID = WSHNetwork.UserName
>  Loop Until strUserID <> ""

> Which I found in someone else's login script but it doesn't seem to help.

> Any suggestion would be appreciated.

> Ken Douglas




Sat, 15 Dec 2001 03:00:00 GMT  
 Login script - Script running before user logs on.
Also set an error trap to keep the script from being blown away...

On Error Resume Next
Do
  strUserID = WSHNetwork.UserName
Loop Until strUserID <> ""
On Error GoTo 0

The problem is that on Win9x systems, the logon script begins executing before
the user is fully logged on...

--
Michael Harris


| I am trying to use WSH (cscript.exe) to run login scripts for Win95 clients
| on NT4 server.  The problem I seem to be having is that I can't create a
| User object in the script as the script runs before the user is logged on.
|
| eg, strUserID = WSHNetwork.UserName
|
| When I look at the value of strUserID in the de{*filter*} it is always nil.
|
| The script runs fine if I execute it when already logged on, and I can see a
| value for strUserID in the de{*filter*}.
|
| I am using a batch file nominated in the user profile to start "cscript
| loginfile.wsh"
|
| I remember seeing a reference to this issue in Andrew Clinicks' slide show,
| but is there any resolution?
|
| BTW I have tried;
|
|  Do
|   strUserID = WSHNetwork.UserName
|  Loop Until strUserID <> ""
|
| Which I found in someone else's login script but it doesn't seem to help.
|
| Any suggestion would be appreciated.
|
| Ken Douglas

|
|



Sat, 15 Dec 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Login script - Script running before user logs on.

2. User Groups in Login Scripts

3. Script for logging users on through VPN connection

4. Users login script = variable?

5. Specify Login Script In User Manager in NT4 Domain

6. Detecting a remote dialup user in a login script

7. Check the User Name in Login script

8. Users full name i login script

9. WHS Login Script - Deployment and User Information

10. Domain Login-Script / regarding user′s groups

11. NT Command Script - log in user

12. Newbie: Script to setup users Exchange account on login

 

 
Powered by phpBB® Forum Software