Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do you run a VFP program as a Win2000 Service?
Message
De
16/01/2002 06:37:45
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00601302
Message ID:
00605300
Vues:
20
>We are moving a system from Win98 to Win2000 Pro. The system has several programs that run in the background accepting and sending data via DDE. These programs currently have a visible window but htere really is no purpose for the window other than to close the program, which is almost never done.
>
>So my question is, How can we set these programs up to as a service in Windows 2000 Pro? That way they can still be easiliy started and stopped but do not clutter the desktop or task bar.
>
>Thanks,
>Tom

The following is blagged from another help site, but was helpful. (I'm actualy here trying to get help on a Service I've created). Here's your info:
Have fun
Moose
_______________________________________________________
Title: Making Visual FoxPro run as a service on Windows NT
___________________________________________________________
There are several reasons to make an application run as a service on Windows NT. However, it may not be applicable to all applications.
Running an application as a service will allow the Windows NT to load your application at startup without requiring a login. Also, I have found that some applications might run a little better, especially those using a lot of events like socket programming.
If you have the ressource kit, you will find 3 files called SRVANY.EXE, SRVANY.WRI and INSTSRV.EXE.
Switch to the directory where INSTSRV.EXE is
Install a new service giving it the name of the Visual FoxPro service and the full location of srvany.exe: instsrv VFPServer c:\tools\srvany.exe
Go in control panel, open the services window and make the necessary adjustements for VFPServer
Access the registry
Under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MyService: create a 'Parameters' key
Under the above key, create an 'Application' value of type REG_SZ and specify the full path of your executable: Application: REG_SZ: D:\TOOLS\VI.EXE
Under the above key, create an 'AppDirectory' value of type REG_SZ and specify the current directory to use for the executable: AppDirectory: REG_SZ: C:\TMP
You may now return to the control panel and try to start the service.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform