1.- How can i run a program not as a service from a service (my own app running as a service)?
Im running some app as service, but if i tried to run some other app it starts as a service, buts as is not s service is crashes. I want to run from my service app some other app not as a service, its possible?
2.- I read Rings made a service lib, where can i found it?
Thanks in advance
Question of running app as a service
Question of running app as a service
ARGENTINA WORLD CHAMPION
1) Yes if you start an app from a service, it trys to start it under the current username (services) in which it can't run, so you have to make it start the program under another username, using runas or equiv
2) Rings NT lib was part of his PB power pack, talk to him about it
I dunno if he wants it distributed
2) Rings NT lib was part of his PB power pack, talk to him about it
Re: Question of running app as a service
A program that you run from within a service does NOT run as service, but as a regular application.ricardo wrote:1.- How can i run a program not as a service from a service (my own app running as a service)?
Im running some app as service, but if i tried to run some other app it starts as a service, buts as is not s service is crashes. I want to run from my service app some other app not as a service, its possible?
The trouble is, if you run the service as SYSTEM service, other programs run under this account as well, which might prevent it from things, like accessing a network share.
If you want to use a GUI and have users input data, you need to select "allow to interact with service" in the user account.
To bypass the networking restriction, you can have the program run under a seperate account (needs the LogonAsService privilege). But then you get into another trouble: you cannot interact with the GUI (output/input). Not possible except with some very low level hacks.
The usual way, to realize such services - as I assume you want to do is - to split the functionality into 2 parts:
1. The service itself, running as SYSTEM or another (priviledged?) user
2. A helper program, launched at each startup, running as the logged on user.
The service communicates with the helper program, exchanges data and each part does the tasks it can do.
This is how basically all apps run, that require this setup; like Sophos Anti-Virus, NetInstall and so on.
Athlon64 3800+ · 1 GB RAM · Radeon X800 XL · Win XP Prof/SP1+IE6.0/Firefox · PB 3.94/4.0
Intel Centrino 1.4 MHz · 1.5 GB RAM · Radeon 9000 Mobility · Win XP Prof/SP2+IE6.0/Firefox · PB 3.94/4.0
Intel Centrino 1.4 MHz · 1.5 GB RAM · Radeon 9000 Mobility · Win XP Prof/SP2+IE6.0/Firefox · PB 3.94/4.0
So. will it generally be possible to write an app as a service?
Here's what I'm planning: I'm running a web server (win 2003 IIS, .NET framework), and I want to receive data via an explicit port. So my app has to listen to a certain port for any data connection in order to write this data into a mysql database.
But I don't want to bother and check whether the application is running, so I thought of running it as a service, so windows will be able to restart this app automatically if it crashed.
Will this be possible with PB? If so, is there any snippet of code where s.o. already realized something like this kind of service?
Thanks for any hint!
best regards
kalau
Here's what I'm planning: I'm running a web server (win 2003 IIS, .NET framework), and I want to receive data via an explicit port. So my app has to listen to a certain port for any data connection in order to write this data into a mysql database.
But I don't want to bother and check whether the application is running, so I thought of running it as a service, so windows will be able to restart this app automatically if it crashed.
Will this be possible with PB? If so, is there any snippet of code where s.o. already realized something like this kind of service?
Thanks for any hint!
best regards
kalau
-
FloHimself
- Enthusiast

- Posts: 229
- Joined: Wed May 14, 2003 3:38 pm
- Location: Lüneburg - Germany
viewtopic.php?t=14488kalau wrote:So. will it generally be possible to write an app as a service?
My favorite numbers: 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0


