Page 1 of 1

I'm new and need help. Running a remote file

Posted: 12 Dec 2011 06:05
by Domino
Hello all,
I'm not familiar with batch file thing however, I need one to make my life a bit easier.

I have 5 servers that their automatic anti-virus update is not running so I have to do it manually on each server and on a daily basis.

Let's say I have downloaded the update as an exe file and need to execute that file on each server daily. The file is downloaded on one server. I want all servers to execute that update without my intervention at all.
So I need a batch file that runs the update.exe from one server. Of course I can schedule
the process. Any help will be highly appreciated.

Thanks

Re: I'm new and need help. Running a remote file

Posted: 12 Dec 2011 13:54
by orange_batch
Share the folder you download the update to over your network.

On the other computers, without need of credentials, it's as easy as:

Code: Select all

"\\Server Name\Share\update.exe"

It can't interact with any update agreements or clicking yes though, but you could write a VBScript to go with the batch if such required button presses are always the same.

cscript help_update.vbs //nologo "optional window title name to focus on"

Code: Select all

set a=wscript.createobject("wscript.shell")
if wscript.arguments.count=2 then a.appactivate wscript.arguments(1)
a.sendkeys "your keys here. a list of special keys like {esc} can be found online"

You could even download the update automatically if the update path is static or predictable.

Download sfk or wget (an easy Google)...

Code: Select all

sfk wget "url" "save to"