Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logon script issue

Status
Not open for further replies.
Mar 1, 2003
853
US
We are running w2k server with mixed OS such as wn9x and w2k. We use
vbscript for w2k users to map the network drives and printers based on their
groups. If the users use win9x, they just do the basic mapping (see below).

Recently, the backup freezes the domain controllers (we have two domain
controllers) randomly. In this case, if the server1 is down, the logon
script will stop because of the line wscript \\server1\netlogon\logon.vbs.
Changing to the server2 doesn't fix the problem because the server2 may be
down too. Before I fix the backup problem, can I write the vbscript like "if
server1 is not available go to server2"? If yes, how? Or any better
suggestions?

REM Batch file to detect OS
REM -----------------------------------
IF "%OS%" == "Windows_NT" goto NT_OS
rem Other than Windows NT
goto WIN_95

:NT_OS
wscript \\server1\netlogon\logon.vbs
goto END

:WIN_95
net use u: \\apps1\apps1
net use h: /home
goto END

:END

Robert Lin, MS-MVP, MCSE & CNE
Windows, Network and How to at
 
in batch you could try and put stamp files on each server

something like

net use j: \\server\share
if exist j:\stamp.txt goto ithasbeenconnected

rem it failed so try second server
net use j: \\failoverserver\share

:itshasbeenconnected


in vbscript do a

FSO.FolderExists before trying to map the drive

regards
richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top