Creating a binary file that consists of a service and a normal application can be done very simple without using the service manager. Just check for SYSTEM account. It is very unlikely that your app is run as SYSTEM (only RunAsSys does ). uses …, JwsclToken; begin if JwIsSystem then begin [...]
Posted by: Christian Wimmer in: JEDI Windows API Headers
Unfortunately Borland didn’t implement a public register and start function into the class TServiceApplication. So we have to do it ourselves. First we publish the protected RegisterServices function to allow (un-)install our service(s) programmatically.
Posted by: Christian Wimmer in: JEDI Windows Security Code Lib
This simple code excerpt can only be run under SYSTEM account (say in a service). It retrieves the token from the logged on user – especially the user at the physical console. Or in other words the user data of the person that sits in front of the computer. The main code which does the [...]