473,624 Members | 2,254 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 "RegisterServic eCtrlHandlerExW " 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.EnumOb jectItems:

items, instances = win32pdh.EnumOb jectItems(None, None, \
'Process', win32pdh.PERF_D ETAIL_WIZARD)

My question: Why does win32pdh.EnumOb jectItems 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 2731

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

Similar topics

2
10165
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 something. Unfortunately I'm getting all kinds of weird behaviour.. In my main script I'm using exec() (also tried the other options) to start a ..bat file. This actually works, the batch file is launched and is able to write something to disk.....
0
1678
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 EnumObjectItems does indeed work fine under XP but build 156 does not appear to work under Windows 2000 (Service Pack 4). Below is the Traceback: >>> win32pdh.EnumObjectItems(None,None,"Process", -1) Traceback (most recent call last): File...
0
494
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. First the background: I'm trying to write a program that monitors processes on a legacy Windows NT 4.0 box. I have written one version of this program that I can run from the command line --- but logging out of the account kills the program. I...
1
1650
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 using a for loop to render a serie of images, which are rendered | filtered | composited > to an image The problem is that instead of a single pipeline 2 are being executed in
3
1330
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 that doesn't accept parms (or can it?) how do i get the message parm into the background sub? 2nd question: is this worth the trouble? thanks,
2
4860
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 heavily on the ability to start multiple long-running SQL scripts in the background and have them all run in parallel. Unfortunately, it seems that somewhere between fixpak 7 and fixpak 11 something has been fixed / broken which prevents more...
11
3111
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 that page sitting there loading for 20 minutes while the FTP completes. Here's what I have: $zipfile = $order_po.".zip";
33
1992
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 that on an extra thread but I think it is a bad idea to spawn a new thread everytime a log-message is written and let it die once the message was written. But how do I keep a thread alive and trigger the log-messages and pass the string to that...
2
3522
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. When someone logs off from the console, the runtimes for the processes are given the shutdown command. I would expect this if the processes were running as the logged in user, but they are running as the SYSTEM user. Has anyone else...
14
1211
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? Thanks Regards
0
8233
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8619
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8334
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8474
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7158
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5561
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4078
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2604
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1784
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.