[fpc-pascal] fcl-extra ServiceManager doesn't seem to working with unelevated Windows account?

2011-10-04 Thread Reinier Olislagers
Hi list, First wanted to check with you if I'm doing something wrong. Using the ServiceManager unit (Windows only), I'm trying to find out if a service is running (Vista x64). I can do: sc query samss on the command line without problem. When I run fpc ServiceTest.pas rem Free Pascal Compiler

Re: [fpc-pascal] fcl-extra ServiceManager doesn't seem to working with unelevated Windows account?

2011-10-04 Thread Sven Barth
Am 04.10.2011 12:22, schrieb Reinier Olislagers: Services.Connect; Services.Acces := SC_MANAGER_CONNECT; //Note typo in property. You need to set Acces(s), before calling Connect, because the connection API OpenSCManager is called inside Connect using the access flags that were

Re: [fpc-pascal] fcl-extra ServiceManager doesn't seem to working with unelevated Windows account?

2011-10-04 Thread Reinier Olislagers
On 4-10-2011 12:31, Sven Barth wrote: Am 04.10.2011 12:22, schrieb Reinier Olislagers: Services.Connect; Services.Acces := SC_MANAGER_CONNECT; //Note typo in property. You need to set Acces(s), before calling Connect, because the connection API OpenSCManager is called inside