VDF running as a Windows NT Serviceby Frank G. Vandervelpen
Software running as a service on NT Author: Frank G. Vandervelpen (Original published as a web White paper)
Ownership: Mutual project of Vandervelpen Systems and Antwise solutions DataFlex-version: 4.0/5.0/6.0 (VDF) e-Mail us @ info@vdf-guidance.com VDF GUIdance is a mutual project of
Frank Vandervelpen - Vandervelpen Systems and Wil van Antwerpen - Antwise Solutions PurposeThis document describes how to make a software program (VDF) run as a service on Microsoft Windows NT4.0.r. There are a lot of reasons why this could be useful. Suppose we want a program to run continuously, even when someone is not logged in. This can be for the sake of security since it runs by itself under a system account. A second argument for this is because of system backups. It is sometimes difficult to make backups when software is running, locking databases and blocking the backup utility. A background service can be stopped and restarted automatically from any kind of NT timer. ResponsibilityThis document can be used as a feedback document, but you have to double-check everything. We are not responsible for direct or indirect faults or loss to hardware, software or data on your information system. RequirementsWe have done our project on a Windows NT 4.0 r Int'l Edition Server with Support Pack 3. In addition we have installed the Microsoft Windows NT 4.0 r Resource kit. Services do.... * Allow applications to survive logon/logoff sequences, hence saving the overhead of restarting them for each user that logs on.
Note As far as I could understand you can not run a user-data entry and network aware software in one service. You have to make a choice between those.
Steps to Follow
The next part will show you an example of the registry settings for such a service definition of a program. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WANExchange] "Type"=dword:00000110 "Start"=dword:00000002 "ErrorControl"=dword:00000001 "DisplayName"="WANExchange" "ObjectName"="LocalSystem" "ImagePath"=hex(2):63,3a,5c,6e,74,52,65,73,6b,69,74,5c,73,72,76,61,6e,79,2e,65,\ 78,65,00 "AppParameters"="WANexchange.vdf" "AppDirectory"="H:\\accoflex\\mits\\wan\\programs\\" "Application"="H:\\accoflex\\Mits\\Wan\\Programs\\Dfrun.exe" "Security"=hex:01,00,14,80,c0,00,00,00,cc,00,00,00,14,00,00,00,34,00,00,00,02,\ 00,20,00,01,00,00,00,02,80,18,00,ff,01,0f,00,01,01,00,00,00,00,00,01,00,00,\ 00,00,20,02,00,00,02,00,8c,00,05,00,00,00,00,00,18,00,8d,01,02,00,01,01,00,\ 00,00,00,00,01,00,00,00,00,f8,00,14,00,00,00,1c,00,fd,01,02,00,01,02,00,00,\ 00,00,00,05,20,00,00,00,23,02,00,00,06,00,00,00,00,00,1c,00,ff,01,0f,00,01,\ 02,00,00,00,00,00,05,20,00,00,00,20,02,00,00,06,00,00,00,00,00,1c,00,ff,01,\ 0f,00,01,02,00,00,00,00,00,05,20,00,00,00,25,02,00,00,06,00,00,00,00,00,18,\ 00,fd,01,02,00,01,01,00,00,00,00,00,05,12,00,00,00,25,02,00,00,01,01,00,00,\ 00,00,00,05,12,00,00,00,01,01,00,00,00,00,00,05,12,00,00,00 "0"="Root\\LEGACY_WANEXCHANGE\\0000" "Count"=dword:00000001 "NextInstance"=dword:00000001 |
|||||||||||
Copyright © 1999 - 2024 VDF-GUIdance on all material published, for details see our Disclaimer. |