Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vista problem
Message
De
31/08/2007 08:37:37
 
 
À
30/08/2007 15:53:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Installation et configuration
Titre:
Divers
Thread ID:
01251167
Message ID:
01251653
Vues:
25
Hi Don.

>Thanks Doug. I'll give that a try. Would the technique work for non-vista machines as well, or is the concept of an "elevated task" new to Vista?

As Craig mentioned, it's new to Vista. So, you can use a wrapper on the RunAs parameter:
ShellExecute('SomeProgram.EXE', iif(os(3) >= '6', 'RunAs', ''))
>Also, if I was to set it up to run from the server, I presume the app would have to be "installed" on the server with all the VFP runtime etc. Correct?

Only if you're going to actually run it on the server. If it's only being run from workstations, the EXE (and probably data) sit on the server but the VFP runtimes and any ActiveX components (ie. anything that needs to be registered with COM) sit on the workstation.

>If I did this, I assume I would not be able to overwrite the exe if there was a user who was currently running the app. Correct? So for management purposes I would need a separate program to shutdown the current users so I could update the program. Are there other changes I would have to make to enable multi-users on the exe?

The way I've handled this in the past is to create a timer that checks every minute or so for the existence of a file that doesn't normally exist (e.g. FILE("SHUTDOWN.TXT")). If it does exist, it displays a message box telling the user to save their changes and exit, then it starts another timer with a 2 minute interval, giving them time to finish up what they're doing. The second timer's Timer event shuts down the app. Also, in the app's startup code, check for the existence of the file as well; if it exists, tell the user the system is down for maintenance and exit. That prevents someone from starting up the app and starting the whole "wait until they're done their changes" period again.

So, when you need to kick all the users out, create a file called SHUTDOWN.TXT and wait a few minutes. Replace the EXE, then delete SHUTDOWN.TXT.

Doug
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform