
Error on getting username in a logon script.
Hi, all.
I tried to make an shortcut, which is a user's network folder.
So my logon script looks like this,
--
On Error Resume Next
NetUser=""
Do While NetUser=""
NetUser = WshNetwork.Username
Loop
Set oUrlLink2 = WshShell.CreateShortcut(strDesktop & "\" & NetUser & "'s
Directory.lnk")
oUrlLink2.TargetPath = "\\server\shared\" & NetUser
oUrlLink2.Save
--
But when I loged on a win95 machine, I got an error message saying that the
user hasn't loged on yet, something like this.
(I can't translate the Korean error message into English on exactly.)
My guess about this error is the script seems to be excuted a little bit
earlier than it gets the necessary information, like UserName
, etc...
Is there any way to solve this problem.
Well, I hope this posting will be the last one for what I am doing now.
Thanks in advance.....