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

Run application on different machine on Network 1

Status
Not open for further replies.

AP81

Programmer
Apr 11, 2003
740
AU
I recently wrote an application which updates all our MySQL databases with new info/quotes,etc. The problem is this:

The application is currently stored as //fileserver/f-drive/update.exe on the fileserver. When a user runs the .exe it runs the update fine. However
I want the application to run on the fileserver using the fileserver's resources (CPU, RAM); rather than running on the client's computer using their computers resources.

Is something like this possible (without have to write client server software)?

Thanks in advance.


------------------------------------
There's no place like 127.0.0.1
------------------------------------
 
I assume you are running under Windows: other than a client/server approach (which you don't want), I think the only other way is Terminal Services.

But better you asking in the OS forum; the sysadmins are better suited to answer your question.

buho (A).
 
If you run a SQL query on a SQL database server (whichever brand doesn't care), the whole trick of the server thingy is it is running on the server! so if your update procedure is using SQL statements, then you could easily run it over a thelephone line using a modem (except when the exe is large ofcourse) without any performance problems. It's running right where it should, on the server. (and I mean period.) ::)
The only problem could be the user is forced to wait for the update to finish.

Possible automatic solution:
1) create a batchfile in the same directory as the update file, call it checkup.cmd (you should at least be running Windows-NT class server I assume)
This file checks for the existence of the updater.exe file, and if it exists, then executes it, and afterward renames or removes it, avoiding possible double runs.
Code:
checkup.cmd:
if exist amrunning goto end
if not exist notrunning echo runstatus >notrunning
ren notrunning amrunning
if not exist updater.exe goto nothing
updater
if errorlevel 1 goto errexit
del updater.exe
:nothing
ren amrunning notrunning
goto end
:errexit
date /t >>error.log
time /t >>error.log
echo "some error occured during updater.exe" >>error.log
echo "updatesystem blocked" >>error.log
:end

2) Add an entry to the scheduler, allowing for 'interactive-mode', to run checkupd.cmd in the frequency you need, like once per week, once per hour, or whatever.

3) Thoroughly check your updates before deploying them

4) put the updater.exe in the directory as soon as you have a new version, and after the time-interval it will be automagically installed ;-)

HTH
TonHu
 
Thanks TonHu, will give it a try. I guess I can always use the indy components and create a client/server approach if it doesn't work.


------------------------------------
There's no place like 127.0.0.1
------------------------------------
 
Never imagined it was a non-interactive process.

Very good perception, HonTu.

buho (A).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top