
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