473,402 Members | 2,046 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,402 software developers and data experts.

win32pdh and background processes

Hi there:

I am trying to write a program to monitor certain processes on a
Windows NT 4.0 box without me needing to be logged in. I have
successfully created a python program that performs this task by
running as a service on Windows 2000, but it fails on Win NT due to a
missing procedure entry point "RegisterServiceCtrlHandlerExW" in
ADVAPI32.dll; this problem appears to be due to the servicemanager
module, and exists in all versions of the win32 package back to 161,
which is when the servicemanager module first appeared. I then tried
to run the program in an infinite loop using the "Scheduled Tasks"
service to spawn the program. If I am logged in when the program is
running, the program runs fine, although it creates a console on my
screen. However, if I am not logged in when the program kicks off, my
program dies on a call to win32pdh.EnumObjectItems:

items, instances = win32pdh.EnumObjectItems(None, None, \
'Process', win32pdh.PERF_DETAIL_WIZARD)

My question: Why does win32pdh.EnumObjectItems die when I'm not
logged in?

Any help you can give me would be greatly appreciated.

--- David Jessup
(N.B.: My e-mail address has a fairly obnoxious spam filter running,
due to the large amounts of spam I receive at this address. If you
choose to e-mail me privately, ignore any e-mails from the spam
filter.)
Jul 18 '05 #1
0 2714

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

Similar topics

2
by: Bob | last post by:
Hi, I'm trying to build a PHP page which launches another php script to be run in the background. The web page should return immediately, while the background script may run for 10 minutes or...
0
by: Steve Zatz | last post by:
I understand that there was a problem with win32pdh.EnumObjectItems under Windows XP but that recent versions of win32all corrected the problem. I installed win32all build 156 (Python 2.2.3) and...
0
by: David L. Jessup | last post by:
I'm sorry if this is a duplicate posting. I attempted to post before, but it doesn't appear to have been sent out correctly. Anyway, I've got a problem, and I'm hoping somebody here can help....
1
by: Jelle Feringa // EZCT / Paris | last post by:
James, Terry, Thanks for your constructive comments. Let's see if we can come down to the heart of the matter, it seems to me these are fundamental issues relevant in any shell script. I'm...
3
by: ari | last post by:
hey all, i have a shared sub called WriteToErrorLog(msg as String) for obvious purposes. How do i send that to a background thread? i'm stuck on the part where thread.start executes a subroutine...
2
by: Dave Hughes | last post by:
Just noticed something rather annoying after upgrading my test box (a Linux server running DB2 UDB v8 for LUW) to fixpak 11 (for reference it was previously on fixpak 7). In the past I've relied...
11
by: news | last post by:
I've a PHP script that does some stuff, zips up some files, and starts an FTP process. I need it to do the Zip and FTP in the background and let the page finish, otherwise the user could have...
33
by: bonk | last post by:
I have an application that needs to perform some background work, i.e. Logging, wich must not block the main thread. How would I basically design such a scenario? It is obvious that I should do...
2
by: Troy Matteoli | last post by:
I'm having an issue running some java processes on a Windows server. My system has serveral java processes that are started in the background by a system service. They are run as the SYSTEM user....
14
by: John | last post by:
Hi I have a winform app. When this app is closed it remains under 'Processes' in Task Manager. What is the problem and how can I ensure that app closes completely and releases all resources? ...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.