I have a very simple win32serviceutil script:
import win32serviceutil, time
win32serviceutil.StartService("burek", "localhost")
time.sleep(10)
exit()
It successfuly imports win32serviceutil, and chokes on StartService:
Traceback (most recent call last):
File "foobar.py", line 3, in ?
win32serviceutil.StartService("burek", "localhost")
File "C:\Python24\Lib\site-packages\win32\lib\win32serviceutil.py", line
399, in StartService
hs = SmartOpenService(hscm, serviceName, win32service.SERVICE_ALL_ACCESS)
File "C:\Python24\Lib\site-packages\win32\lib\win32serviceutil.py", line
76, in SmartOpenService
return win32service.OpenService(hscm, name, access)
pywintypes.error: (1060, 'OpenService', 'The specified service does not
exist as an installed service.')
What does that mean?
--
"Now the storm has passed over me
I'm left to drift on a dead calm sea
And watch her forever through the cracks in the beams
Nailed across the doorways of the bedrooms of my dreams" 5 3763
On Nov 25, 2:40 pm, Nikola Skoric <nick-n...@net4u.hrwrote:
I have a very simple win32serviceutil script:
import win32serviceutil, time
win32serviceutil.StartService("burek", "localhost")
time.sleep(10)
exit()
It successfuly imports win32serviceutil, and chokes on StartService:
Traceback (most recent call last):
File "foobar.py", line 3, in ?
win32serviceutil.StartService("burek", "localhost")
File "C:\Python24\Lib\site-packages\win32\lib\win32serviceutil.py", line
399, in StartService
hs = SmartOpenService(hscm, serviceName, win32service.SERVICE_ALL_ACCESS)
File "C:\Python24\Lib\site-packages\win32\lib\win32serviceutil.py", line
76, in SmartOpenService
return win32service.OpenService(hscm, name, access)
pywintypes.error: (1060, 'OpenService', 'The specified service does not
exist as an installed service.')
What does that mean?
--
"Now the storm has passed over me
I'm left to drift on a dead calm sea
And watch her forever through the cracks in the beams
Nailed across the doorways of the bedrooms of my dreams"
Looks like Microsoft thinks you mis-spelled it. http://www.microsoft.com/technet/pro....mspx?mfr=true
I would check and see if that service is installed on your PC. You can
go to Start --Run and type services.msc
Scroll through there and see if your service is listed. You might
check to see if you can enable/disable it via that console as well.
Mike
Dana Sun, 25 Nov 2007 13:52:35 -0800 (PST), ky******@gmail.com <ky******@gmail.comkaze:
Looks like Microsoft thinks you mis-spelled it.
http://www.microsoft.com/technet/pro....mspx?mfr=true
I would check and see if that service is installed on your PC. You can
go to Start --Run and type services.msc
Scroll through there and see if your service is listed. You might
check to see if you can enable/disable it via that console as well.
Seems like I misunderstood Windows services (I'm porting UNIX daemon
to Windows so I'm thinking in UNIX terms). I didn't know I have to
_install_ a service before I _start_ it. How do I install a service?
--
"Now the storm has passed over me
I'm left to drift on a dead calm sea
And watch her forever through the cracks in the beams
Nailed across the doorways of the bedrooms of my dreams"
On Nov 25, 5:11 pm, Nikola Skoric <nick-n...@net4u.hrwrote:
Dana Sun, 25 Nov 2007 13:52:35 -0800 (PST),
kyoso...@gmail.com <kyoso...@gmail.comkaze:
Looks like Microsoft thinks you mis-spelled it.
http://www.microsoft.com/technet/pro...0serv/reskit/w...
I would check and see if that service is installed on your PC. You can
go to Start --Run and type services.msc
Scroll through there and see if your service is listed. You might
check to see if you can enable/disable it via that console as well.
Seems like I misunderstood Windows services (I'm porting UNIX daemon
to Windows so I'm thinking in UNIX terms). I didn't know I have to
_install_ a service before I _start_ it. How do I install a service?
--
"Now the storm has passed over me
I'm left to drift on a dead calm sea
And watch her forever through the cracks in the beams
Nailed across the doorways of the bedrooms of my dreams"
Sorry I didn't reply sooner. If you're creating a service based on a
Python file, check out the following links in addition to the book
Wolfgang mentioned: http://agiletesting.blogspot.com/200...s-windows.html http://www.thescripts.com/forum/thread595660.html http://essiene.blogspot.com/2005/04/...-services.html
That should get you started. Hope it helps!
Mike
Dana Mon, 26 Nov 2007 08:50:23 -0800 (PST), ky******@gmail.com <ky******@gmail.comkaze:
Sorry I didn't reply sooner. If you're creating a service based on a
Python file, check out the following links in addition to the book
Wolfgang mentioned:
http://agiletesting.blogspot.com/200...s-windows.html http://www.thescripts.com/forum/thread595660.html http://essiene.blogspot.com/2005/04/...-services.html
That should get you started. Hope it helps!
Huh. Thank you guys a lot. I took a glance (albeit a rather long one)
and decided that my users will have to install cygwin if they want to
use my script. Service handling is just a bit to complicated (after
creating UNIX daemon with 2 consecutive forks), and I'm not going to
be paid for this :-D
--
"Now the storm has passed over me
I'm left to drift on a dead calm sea
And watch her forever through the cracks in the beams
Nailed across the doorways of the bedrooms of my dreams"
On Nov 28, 1:59 pm, Nikola Skoric <nick-n...@net4u.hrwrote:
Dana Mon, 26 Nov 2007 08:50:23 -0800 (PST),
kyoso...@gmail.com <kyoso...@gmail.comkaze:
Sorry I didn't reply sooner. If you're creating a service based on a
Python file, check out the following links in addition to the book
Wolfgang mentioned:
http://agiletesting.blogspot.com/200...-script-as-win... http://www.thescripts.com/forum/thread595660.html http://essiene.blogspot.com/2005/04/...-services.html
That should get you started. Hope it helps!
Huh. Thank you guys a lot. I took a glance (albeit a rather long one)
and decided that my users will have to install cygwin if they want to
use my script. Service handling is just a bit to complicated (after
creating UNIX daemon with 2 consecutive forks), and I'm not going to
be paid for this :-D
--
"Now the storm has passed over me
I'm left to drift on a dead calm sea
And watch her forever through the cracks in the beams
Nailed across the doorways of the bedrooms of my dreams"
Yeah...a lot of things on Windows is just too complicated for its own
good. Every now and again you'll stumble across something that's
pretty elegant though.
Mike This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: max |
last post by:
I am building a service based on win32serviceutil.ServiceFramework. By
default it comes out as 'manual start' service. How do I get it to start
automatically?
thanks,
max.
|
by: Kerry Neilson |
last post by:
For the past couple of months, Idle won't start when I invoke it. I
am at a complete loss for why this is. When this happens, they python
command line still starts, and python works fine...
|
by: Erik Myllymaki |
last post by:
I am trying to start and stop a service with python. This used to work on an NT
box but not on this 2003 server machine. (note- using "net stop myService" and
net start myService" from the command...
|
by: DaveJohnson12 |
last post by:
I installed PWS 4.0 on my Windows 95 computer. It installed and ran nicely
without any problems for several months. Then I stopped using it for a while.
Now that I need it again it won't start. The...
|
by: Vince |
last post by:
I'm getting this message when I try and run a .net web app
in the development system:
CS0016: Could not write to output file 'c#:\windows
nt\Microsoft..net framework\v1.1.4322\Temporary ASP.NET...
|
by: cab0san |
last post by:
I downloaded the DB2 runtime client, but the Client Base support and
the TCP protocol do not install. I re-run the setup select them to run
from disk, and they still show as not installed. What am...
|
by: taylorjonl |
last post by:
I am completely baffled. I am writting a daemon application for my
work to save me some time. The application works fine at my home but
won't work right here at work. Basically I have a...
|
by: JDF |
last post by:
I am trying to create a Windows service using SimpleXMLRPCServer and
win32serviceutil. The service itself seems to be working properly
(starts, stops, etc) and I can connect using an XMLRPC client...
|
by: =?Utf-8?B?Sm9uYXRoYW4gU21pdGg=?= |
last post by:
I have written a service, but it won't stop, Eventvwr reports the following:
"Failed to stop service"
The code is as follows:
============================================
Protected Overrides...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
|
by: Teri B |
last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course.
0ne-to-many. One course many roles.
Then I created a report based on the Course form and...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM)
Please note that the UK and Europe revert to winter time on...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
|
by: isladogs |
last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, Mike...
| |