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

Where Should EXE's Launch From- Server or User's Local Hard Drive? 10

Status
Not open for further replies.

drosenkranz

Programmer
Sep 13, 2000
360
US
Hello,

We're having a philosophical discussion in terms of performance on where the EXE should be launched from, the server or the local user's hard drive.

Option #1 says that the EXE should be launched from the user's local hard drive. An update program on the user's machine checks the server for an updated version of the EXE. If the EXE on the server is newer (an update), then the file is first copied down to the local user's hard drive and then launched from their own hard drive. Whether an update occurs or not, the EXE is always launched from the local user's hard drive.

Option #2 says the EXE should reside on and be launched from the server.

All databases reside on the server for both options. We have 650+ users that may need to run one or more applications at a time.

Which option is the better choice in terms of performance & network resource usage?

Thank You For Both Your Time And Input,

Dave
The 2nd mouse gets the cheese.
 
I use this for most of my applications. They run from the server (25 or less users). I'm sure it could be modified to to run local. The users' shortcut always points to the original exe. This loader just switches exe's. (new exe's always have the same basename as the original: winword.exe
new exe winword310103.exe. This way the next time the users logs in they run the new exe.


* Abstract: Checks for newer versions of an exe and runs it!
If right(justfname(sys(16)),3)='EXE'
ex=ADIR(executables,'BASENAME*.exe')
* ex=0 if no files , but then that's impossible since this file is an exe!

* sort with latest file on top
=asort(executables,3,-1,1)
* returns -1 if not sorted

* this file running..
thisexe=upper(justfname(sys(16)))
newexe=upper(executables[1])
If newexe<>thisexe
Wait window 'Running latest executable' nowait

Local lcFileName,lcWorkDir,lcOperation

tcOperation=&quot;&quot;
tcWorkDir=sys(5)+sys(2003)+&quot;\&quot;
tcFileName= newexe

If EMPTY(tcFileName)
Return -1
Endif
lcFileName=ALLTRIM(tcFileName)
lcWorkDir=IIF(TYPE(&quot;tcWorkDir&quot;)=&quot;C&quot;,ALLTRIM(tcWorkDir),&quot;&quot;)
lcOperation=IIF(TYPE(&quot;tcOperation&quot;)=&quot;C&quot; AND NOT EMPTY(tcOperation),ALLTRIM(tcOperation),&quot;Open&quot;)

Declare INTEGER ShellExecute ;
IN SHELL32.DLL ;
INTEGER nWinHandle,;
STRING cOperation,;
STRING cFileName,;
STRING cParameters,;
STRING cDirectory,;
INTEGER nShowWindow
=ShellExecute(0,lcOperation,lcFileName,&quot;&quot;,lcWorkDir,1)
Quit
Endif
****** end check for newest version
Endif right(justfname(sys(16)),3)

&quot;I cheat. I have a single field in a database that I can change, and *POOF* all users apps immediately close themselves down, and it won't let them back in. *grins*&quot;

Care to post this code for all to view? I'm assuming you are using a timer?

Thanks



Michael Ouellette
mouellette@compuserve.com
 
Coding Example:

Private strNote
* Check to see if the file exists On User's Machine
IF FILE(&quot;C:\PROGRAM FILES\YourApp.EXE&quot;) = .F. then
strNote = &quot;Please Be Patient While Your Software Is Updated...&quot; + CHR(13)
MESSAGEBOX(strNote,48,&quot;Update Required&quot;)
COPY FILE &quot;F:\Server\YourApp.EXE&quot; TO &quot;C:\PROGRAM FILES\YourApp.EXE&quot;
ENDIF
*
* Store Date Of .EXE's File to compare as current
PUBLIC gd_server_exe_date, gd_local_exe_date
gd_server_exe_date = fdate(&quot;F\:Server\YourApp.EXE&quot;)
gd_local_exe_date = fdate(&quot;C:\PROGRAM FILES\YourApp.EXE&quot;)
*
IF gd_server_exe_date <> gd_local_exe_date then
strNote =&quot;Please Be Patient While Your Software Is Updated...&quot; + CHR(13)
MESSAGEBOX(strNote,48,&quot;Update Required&quot;)
COPY FILE &quot;F\:Server\YourApp.EXE&quot; TO &quot;C:\Program Files\YourApp.EXE&quot;
MESSAGEBOX(strNote,64,&quot;Update Finished&quot;)
ENDIF
*
RUN /N &quot;C:\Program Files\YourApp.EXE&quot;

Dave The 2nd mouse gets the cheese.
 
Interesting subject. Good idea for network users. Will this also work for Terminal Server Users?
 
This has been a helpful thread for me.

The coding example posted by Dave Rosenkranz is simple and answered my questions about the &quot;loader&quot; process (as I've never had to use RUN)

Thank you Dave - have a star!

Kaz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top