Networking Forums

Networking Forums > Computer Networking > Windows Networking > Script Error

Reply
 
 
Diane Lewis
Guest
Posts: n/a

 
      05-10-2007, 03:07 PM
Recently installed Server 2003 on the server and have many Win98 clients
attached. Installed DS Client on 98 PC's. Wrote a script logon.bat that
calls logon.vbs. See both below (1 line in the vbs file is remarked out on
purpose but will be used in the future. The remove network drive entries
are to remove any manual mappings that may exist so that we don't have to
physically go to all 65 machines to undo the manual mappings).

The problem is that when users are logging on the network, they get "cannot
find script file z:\logon.vbs." Some users can log off immediately, log
back on and it runs fine. Some have to logoff/logon or restart 3 or 4 times
before it runs right. At first, this problem occurred infrequently, now it
seems to happen almost every time users logon. Can anyone provide some
insight to this? We will be purchasing new PC's over the remaining year but
would like to resolve this issue for the sake of the users. Thank you,
Diane


logon.bat:

@echo off
wscript %0\..\logon.vbs


logon.vbs:

On Error Resume Next

Dim objNetwork, strUserName

Set objNetwork = CreateObject("WScript.Network")
Set strUserName = objNet.UserName

objNetwork.RemoveNetworkDrive "e:","True","True"
objNetwork.RemoveNetworkDrive "f:","True","True"
objNetwork.RemoveNetworkDrive "g:","True","True"
objNetwork.RemoveNetworkDrive "k:","True","True"

objNetwork.MapNetworkDrive "f:" , "\\ds-main\ddisk"
objNetwork.MapNetworkDrive "g:" , "\\ds-main\Public"
'objNetwork.MapNetworkDrive "h:" , "\\ds-main\users\" & strUserName
objNetwork.MapNetworkDrive "k:" , "\\dserver\mdata"

WSCript.Quit


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RPC error with Logon Script Aaron Windows Networking 4 03-26-2008 06:08 PM
Logon error with script Jörg Windows Networking 0 08-25-2006 08:36 AM
Script host error Ricky Windows Networking 1 04-13-2006 02:52 AM
Printer script error Mervin Williams Windows Networking 0 04-07-2005 05:15 PM
Re: Script error in My Network Places Carey Holzman Windows Networking 0 08-09-2003 09:22 PM



1 2 3 4 5 6 7 8 9 10 11