The thing I was missing: SCM has it's own database. So installing a service is'nt only a change to registry
It seems the only way is to use SC.exe or services APIs to install it i.e. to update services' database.
Anyway, the results of my tests:
1. I embedded the DB engine as a resource.
2. when the program starts I extract it under virtual file name: z:\myDbService.exe (BoxedAppSDK_CreateVirtualFile)
3. I install it, using SC.EXE (SC.EXE does not need the actual .exe to be available)
4. I attach boxedApp SDK to Services.exe (BoxedAppSDK_AttachToProcess) so the SCM to be aware of where my z:\myDbService.exe is when giving it a start control
5. I start the service: net start, sc start or services API
The only problem is being sure the user has enough priviledges to install a service. I suppose in Vista/7 UAC it will be nightmere
BUT, working on this solution I came across other thing. MySQL! Usually it runs as a service. But it may run as ordinary process
! That's cool
I'm going to migrate my App to use MySql instead