nt-services
Frank Immich
frankimmich at gmx.de
Thu Jun 7 12:22:19 EDT 2001
Mark,
thanks for your answer, but at the moment I am fighting with win32 events.
Probably I will have to deal with accounting later on.
In the example win32/demos/service/... it is done for named pipes :
....
hr = ConnectNamedPipe(pipeHandle, self.overlapped)
....
rc = WaitForMultipleObjects((self.hWaitStop, self.overlapped.hEvent),
0,INFINITE)
I want to bind accept() from the socket module to a win32event, so I can
catch if there is a connection to a socket. Someone told that it might work
with win32file.AcceptEx but I have no clue how....Is this the right way or am
I totally wrong?
Ciao Frank
> Hello there,
> I have a question concerning socket connections running as NT-Service. I
> found the demoscript in win32/demos/service/ PipeService.py and I think
> (hope) I understood most of it. But transferring this example using
sockets
> instead of named pipes doesn't work. Basically I want to have a little
service
> running on NT which is waiting for a command from a Unix machine, passing
back
> stdin , sdterr .... Without the NT-service-thing it is working fine.
> I hope you are good address for win32 questions. I have asked this in the
> german newsgroup too, but most of the guys seem to be more experienced in
> UNIX/LINUX (thanks for the answers, anyway). Maybe you can give me a
clearer
> hint. Thanks in advance , Ciao Frank
>
[code snipped]
Frank,
NT Services are rather particular in that by default they start up under the
"Local System" account which does not have access to the network stack.
Your best bet is to start your service under an account that has been setup
on the machine with network access.
You can do this by installing the service then in the Service Manager
Control panel applet, right click on the installed python service and select
properties. This dialog will give you a tab that allows you to specify what
account (username and password are required) to start the service under.
When NT starts the service it will use this account.
NOTE: You do not have to be logged in under this account at the time the
service starts.
Yes, this is a PITA, but that's life with NT/Win2K.
HTH
-Mark
--
Machen Sie Ihr Hobby zu Geld bei unserem Partner 1&1!
http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a
--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
More information about the Python-list
mailing list