View Full Version : logon script
I've created the following Home Directory logon script for Win2000 Server:
*****
' VBScript.
Dim oNet, fUser, sInitial
Set fNet = CreateObject("Wscript.Network")
fUser =oNet.UserName
cInitial =UCase(Left(fUser,1))
If (cInitial < "M") Then
oNet.MapNetworkDrive "N", \\tbk\users\" & fUser
End If
******
The purpose of this logon script is to provide network users a 'home directory' to store data.
But, when I test run the script, an syntax error appeared as follows:
Code: 800A03EA
Source: Microsoft VBscript compilation error
What have I done wrong?
Can anyone help me to create a logon script for a home directory?
Cheers
bk
raddersnz
26-03-2003, 02:18 AM
> I've created the following Home Directory logon
> script for Win2000 Server:
>
> *****
>
> ' VBScript.
> Dim oNet, fUser, sInitial >> you created some dims here :O
>
> Set fNet = CreateObject("Wscript.Network")
>
> fUser =oNet.UserName
>
> cInitial =UCase(Left(fUser,1)) >>> but you did not keep to them?:| - not sure if its just a typo :_|
>
> If (cInitial < "M") Then
>
> oNet.MapNetworkDrive "N", \\tbk\users\" &
> ers\" & fUser
>
>
> End If
>
> ******
>
> The purpose of this logon script is to provide
> network users a 'home directory' to store data.
>
> But, when I test run the script, an syntax error
> appeared as follows:
>
> Code: 800A03EA
> Source: Microsoft VBscript compilation error
>
> What have I done wrong?
>
> Can anyone help me to create a logon script for a
> home directory?
>
> Cheers
>
> bk
>
>
>
Try to keep to use the same dims all through the code :) you might just have it working if you did?:|
radz:p
> > I've created the following Home Directory logon
> > script for Win2000 Server:
> >
> > *****
> >
> > ' VBScript.
> > Dim oNet, fUser, sInitial >> you created some
> dims here :O
> >
> >
> > cInitial =UCase(Left(fUser,1)) >>> but you did
> not keep to them?:| - not sure if its just a typo
> :_|
> >
> >
> > ******
> >
> > The purpose of this logon script is to provide
> > network users a 'home directory' to store data.
> >
> > But, when I test run the script, an syntax error
> > appeared as follows:
> >
> > Code: 800A03EA
> > Source: Microsoft VBscript compilation error
> >
> > What have I done wrong?
> >
> > Can anyone help me to create a logon script for a
> > home directory?
> >
> > Cheers
> >
> > bk
> >
> >
> >
> Try to keep to use the same dims all through the code
> :) you might just have it working if you did?:|
>
> radz:p
Thanks, raddersnz.
As I am completely new in this (vb script) and I did not actually create this script myself - I copied from somewhere and modified it. I don't quite understand your comments.
Would therefore, appreciate it if you could correct it for me.
Many thanks.
bk
Powered by vBulletin® Version 4.2.5 Copyright © 2019 vBulletin Solutions Inc. All rights reserved.