473,382 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

win32serviceutil won't start

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"
Nov 25 '07 #1
5 3820
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
Nov 25 '07 #2
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"
Nov 25 '07 #3
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
Nov 26 '07 #4
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"
Nov 28 '07 #5
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
Nov 28 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
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.
16
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...
1
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...
1
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...
4
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...
13
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...
5
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...
0
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...
5
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.