Click to See Complete Forum and Search --> : Login script problem
Sebastien
02-27-2002, 09:13 AM
I'm trying to create a login script that will allow me to determine the group of a user and map its personal drives accorgingly. I have tried almost every script available on the net and nothing works. The major problem occurs when I try to determine the domain of the user under Win98. If I use the following code, I get the right user name, but the domain name is left blank.
'****** Now give them their initial values..... ******
Set nUser = WScript.CreateObject("Wscript.Network")
Domain = nUser.UserDomain
UserName = nUser.UserName
I desperately need a solution to be able to map the right network drives, could somebody help me please?
Thanks!
Ross Wakelin
03-04-2002, 10:46 PM
There is a bug in 95/95 that makes them return a blank when
you ask for the domain using adsi. There is a work around
that means you have to take that info from the registry.
The MS online KB has the exact details, sorry I dont have
the reference to hand. Try looking for "logon script 95"
------------
Sebastien at 2/27/2002 10:13:13 AM
I'm trying to create a login script that will allow me to determine the group of a user and map its personal drives accorgingly. I have tried almost every script available on the net and nothing works. The major problem occurs when I try to determine the domain of the user under Win98. If I use the following code, I get the right user name, but the domain name is left blank.
'****** Now give them their initial values..... ******
Set nUser = WScript.CreateObject("Wscript.Network")
Domain = nUser.UserDomain
UserName = nUser.UserName
I desperately need a solution to be able to map the right network drives, could somebody help me please?
Thanks!
You can get the domain from the following registry key on a Win98 machine. Since we are on the topic, anyone know where to get the Windows version from the registry?
[HKEY_LOCAL_MACHINESystemCurrentControlSetServicesM SNP32NetworkProvider]
"AuthenticatingAgent"="Tampa_c"
------------
Sebastien at 2/27/2002 10:13:13 AM
I'm trying to create a login script that will allow me to determine the group of a user and map its personal drives accorgingly. I have tried almost every script available on the net and nothing works. The major problem occurs when I try to determine the domain of the user under Win98. If I use the following code, I get the right user name, but the domain name is left blank.
'****** Now give them their initial values..... ******
Set nUser = WScript.CreateObject("Wscript.Network")
Domain = nUser.UserDomain
UserName = nUser.UserName
I desperately need a solution to be able to map the right network drives, could somebody help me please?
Thanks!