How to make bach file

ashivan
ashivan used Ask the Experts™
on
Hi every one ,,,,

I have winnt4 server in my network and clients are having winme as aworkstation and I am updating the antivirus (Norton 95)maniualy on the server ,

How can I make bach file in the server to force clients to updat the antivirus in them work station automatically once a manth or aweek without do it for every one maniualy .
If this is possibale in details please .

Appriciated

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Put this in the logon script and fill in the the variable settings for command and dayofmonth.

@ECHO OFF
SET COMMAND=
SET DAYtoRUN=

FOR /F "tokens=2 delims=/ " %%D IN ('Date /T') DO (Set DAY=%%D)
IF %DAY%==%DAYtoRUN% %COMMAND%

for example:

@ECHO OFF
SET COMMAND=\\Server\share\exefilename.exe
SET DAYtoRUN=01

FOR /F "tokens=2 delims=/ " %%D IN ('Date /T') DO (Set DAY=%%D)
IF %DAY%==%DAYtoRUN% %COMMAND%

will run the specified file on the 1st of every month.

Make sure users have the right to run the update and update the software.
Otherwise your only option is to run it as a service which would have to be written in C++ and installed on each of the machines. Again quite easily done, let me know if you want the C++ service solution.

Most modern anti virus server programs already have methods in place however to do this automatically. You should check this aswell.

If you want to do days of the week change "tokens=1" in the for loop and use the abreviated form of the day e.g. "Mon" "Tue" e.t.c. remember this is case sensitive.
One thing that is not very clear above that I should point out, there is a space after delims=/   before the ". You must have this here as the space is a delimeter as well as the the /

Commented:
You can avoid all of this if you purchase NAV 8.5 Corporate edition.  It will automatically update the virus definitions on the server, and the workstations pull the definitions off of the server automatically.
Thats what I meant by "Most modern anti virus server programs already have methods in place however to do this automatically. You should check this aswell."

i.e. they already have methods in place for automatic distribution.

Author

Commented:
Thanx for ur help

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial