| Forum Home | ||||
| Press F1 | ||||
| Thread ID: 31561 | 2003-03-25 12:25:00 | logon script | bk T (215) | Press F1 |
| Post ID | Timestamp | Content | User | ||
| 130885 | 2003-03-25 12:25:00 | 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 |
bk T (215) | ||
| 130886 | 2003-03-25 14:18:00 | > 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 |
raddersnz (684) | ||
| 130887 | 2003-03-26 02:10:00 | > > 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 |
bk T (215) | ||
| 1 | |||||