Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where to put the .EXE - on the server or on local machi
Message
From
22/02/1999 15:34:25
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00190038
Message ID:
00190103
Views:
16
>>>As far as performance is concerned, what are the tradeoffs and what is the general consensus about installing a multiuser app?
>>>
>>>I'm assuming that the only difference in performance will be at the time of starting the .EXE. It'll be obviously faster to start locally than off the server, but the downside is multiple copies that need to be maintained, updated, etc
>>>
>>>But is there more to it? If i've got a 2MB .EXE on a server, will it be CONTINUALLY slower during execution, or has it all been read into memory once it starts and so there won't be any more performance difference from the .EXE started locally?
>>>

The problem is you've made a possibly incorrect assumption about the behavior of Explorer - it doesn't necessarily start the .EXE in the context of the directory that the executable resides in, but may start it in the context of the directory Explorer was launched from. That's normally the Desktop - a clue to this would be the sudden appearance of a FOXUSER file on the Desktop.

A solution - use SYS(16,0) to determine where the .EXE was started. Do not rely on CONFIG.FPW to start you in the correct directory; instead, look for a file in the startup directory (or a registry entry, or something with a known, reliably addressible location) to tell you where to start the application, and where to set up the resource files, etc.

This will also allow you to embed a CONFIG.FPW in the .EXE, which will take effect automatically. There are drawbacks to this method if you want to control the location of temporary files on a station by station basis, but if that's the case, you should be more insistent about the application being started by a shortcut. You can ensure this by requiring a command line parameter to be passed at startup to the .EXE - Explorer won't put one there, so you'll know that the app wasn't started from a shortcut that your app knows was built correctly.

>>>In these scenarios the VFP runtime files will ALWAYS reside locally.
>>>
>>>Am I right or am I missing something which might direct me to put my .EXE on each local machine?
>>>
>>>All input welcome!
>>
>>The truth is that using local Exe you will never get worse speed than in case of server Exe. Theoretically, the delay will really happen on start point only, but I remember some threads here that proved something opposite. Also, there are some tools (here UT Files) which allow to make maintainance eisier (launcher programs). Also, using local executable you may provide robust scheme for multi-user environment, i.e. each users starts from his/her own separate local folder with own resource file, configuration table etc.
>
>
>Sounds like local is the way to go. I'm having one wierd problem though.
>
>If I put my .EXE locally and make a shortcut to it where the 'Start in' points to the proper network folder, it's fine. However, if I go through explorer and double-click my .EXE on my local drive, in the same directory as my CONFIG.FPW which also points to the network folder (DEFAULT=F:\MYAPP) then it DOESN't work.
>
>It's like the DEFAULT= is having no effect - Any ideas?
>
>Thanx,
>Joe
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform