Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to detect if a remote application is running
Message
 
 
À
17/04/2001 15:59:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00496345
Message ID:
00496355
Vues:
8
>Hi,
>
>On the advice of Cindy Winegarden I'm posting this message here (thanks Cindy).
>
>I have a VFP app which works in the background processing serial data from a barcode scanner. What I would like to do is allow the app to be "always on", but automate the shutdown of the main form at a set period at night so that open tables can be backed up, then re-open the form when the backup is finished. I can already do this with timers acting on user entered time periods, but would like to take it a stage further to minimize downtime (we sometimes run overnight shifts during busy periods).
>
>My question: Is there a way to detect if a backup utility (or indeed any app) is running on a remote server using VFP? Specifically, it's the cutdown version of Backup Exec which ships with Win2K Server. The idea is to detect that the backup has started and shut down the form at that point, then restart it when the backup closes down.
>
>TIA,
>Neil

Neil,
Don't know if this will help but you might be able to use ADSI to get an object reference to the Backup Exec service and check its status.
local lerror
lerror = .F.
on error lerror = .T.
oservice = getobject('WinNT://Win2KMachineName/< service name >,service')
on error
if !lerror and oservice.Status = 4 then  && you were able to get the service and 4 = Running
   * shutdown your tables
endif
HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform