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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

please comment on this script

Status
Not open for further replies.

brendaluv

Technical User
Dec 2, 2002
144
CA
consider the following script

@echo off
setlocal
set PATHTOFIXES=\\servername/path
if exist "%SYSTEMROOT%\KB840315.log" exit:
if exist "%SYSTEMROOT%\KB840315.log" exit:
"%PATHTOFIXES%\Windows2000-KB840315-x86-ENU.EXE" /quiet /norestart
"%PATHTOFIXES%\Windows2000-KB841873-x86-ENU.EXE" /quiet /norestart
"%PATHTOFIXES%\qchain.exe"

exit:

what i am looking for is samples of scripts where LAN segment IP can be detected based on the client IP, then maps to the server located in the same IP segment. For example if i have a client located @ headquarters, which then travels to a regional office and logs on to the domain, his Laptop will attempt to fetch the patch from headquarters, thus slowing everything down to a pupl...so i want that laptop to fetch the patch from the regional server where he/she is logging onto, not from headquarters...since obviously, they are separated on a slow WAN link.

Regards!

 
First I would recommend that you go away from bat files and move to vbscript.

Next I would point out that you are checking for the same file twice, I think you meant to check for a differnet file the second time based ont he next lines.

Finally, you are exiting if either file already exists. What if only one is installed? Then you are reapplying it which will add unnecessary time to the login.

I would suggest you take a look at the following two FAQs.
faq329-5908 faq329-5798
The first will show you how you can detect the location. The second is geared towards Enterprise login scripts in general.


I hope you find this post helpful.

Regards,

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top