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

Invisible processes in Win2K

Hi!

I'm running a Python program on M$ Windows 2000 as a test monitor. The program
should close various processes, mostly "Application error"-windows, as they are
created. This works fine until the screensaver gets active or until I press
Ctrl-Alt-Del and choose "Lock my computer". At that point, my Python program
cannot see any change when a "Application error" pops up. Without locked
computer, it can identify these windows and close them, but I want it to do
this with the computer locked as well. (My company has a policy that says you
have to lock the computer or activate a password protected screensaver when you
leave your desk)

The code I'm using to list processes looks like this:

# ------------------------------------
def process_callback_function(hwnd, resultdict):
.....# Callback-function for win32gui.EnumWindows
.....wtext = win32gui.GetWindowText(hwnd)
.....if wtext != '' and wtext != 'Default IME':
.........resultdict.update( {wtext:hwnd} )
# ------------------------------------
def getProcessDictionary(w):
.....try:
.........win32gui.EnumWindows(process_callback_fun ction, w)
.....except Exception, message:
.........logAndPrint('Error in getProcessDictionary: ' + str(message))
# --------------------------------
def getProcessList():
.....# Flush old cache
.....win32pdh.EnumObjects(None, None, 0, 1)
.....# Get a list of processes running on the system:
.....try:
.........junk, instances = win32pdh.EnumObjectItems(None,None,'Process',
win32pdh.PERF_DETAIL_WIZARD)
.....except win32api.error, message:
.........logAndPrint('Error in getProcessList(): ' + str(message))
.........return []
.....else:
.........return instances
# --------------------------------

# Code in main loop:
topWindows = {}
getProcessDictionary(topWindows)
for w in topWindows.iteritems():
....if 'Application Error' in w[0]:
........closeProcess(w[1])
I'm using two functions to receive process info: getProcessList and
getProcessDictionary. I have tried to save the result of these, compare them at
different times in the main loop and print newly started processes. This works
great outside "locked computer"-mode where it prints all new processes found,
including Application errors. But when the computer is locked and Application
errors pops up, the Python program shows no new processes. It's not hanged or
freezed, since it can identify the screensaver and also keep doing other work.
So what is so special about the error windows?

Any help with this is greatly appreciated!

Best regards,
/Henrik

Jun 20 '07 #1
1 1495
Hi!

When you lock (the cpu), interactive mode is off.
You can try to use services, who run independently of sessions. But...


Jun 21 '07 #2

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

Similar topics

1
by: Steven O. | last post by:
I am considering installing the .Net IDE and Compiler on my Win2K system. However, a friend tells me that since I have Win2K SP3, the ..Net installation software will, in essence, insist on first...
10
by: p175 | last post by:
Hi folks, I'm after some guidelines on general memory allocations for DB2 8.2.2 ESE on Win2k Server FP4 with 4gb physical memory. Seeing as everything is 32bit and win2k server does not...
4
by: Alan Pong | last post by:
access97, win98 or win2k adv. server sp2 I try compact the mdb file in above OSs. (sometimes i compact it in win98 and sometimes i compact it in win2k) The result surprises me, say in two...
2
by: bbxrider | last post by:
win2k adv server/ iis5.0/vb6.0/ado and/or odbc connections on client machine i have an mdb on win2k adv server machine and want internet read/write to it from both a non-windows, red hat, webserver...
6
by: alanknipmeyer | last post by:
Hi, I`m in the process of migrating a Access 2002 (Run in 2000 mode) from Windows 98 to Win2K Server. It is a shared resource via a file share on the 98 Server. Client systems are Win98 with the...
3
by: rockdale | last post by:
Hi, All: I have a datagrid with TemplateColumn as following: <asp:TemplateColumn Visible="False" > <ItemStyle Width="0px"></ItemStyle> <ItemTemplate> <asp:Label id="lblMin_Value"...
35
by: Carl J. Van Arsdall | last post by:
Alright, based a on discussion on this mailing list, I've started to wonder, why use threads vs processes. So, If I have a system that has a large area of shared memory, which would be better? ...
9
by: Mel | last post by:
I have 10 columns total. 3 of them are invisible. The rest are read- only BoundFields, 3 of which are editable fields using TemplateFields. Upon editing, I want to validate what the user enters...
5
by: Dave | last post by:
I have a program that process files on a hard drive. Everything works fine, it shows a progress bar as it processes the file. The problem occurs when I have the program look for files to process on...
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: 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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
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...
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,...

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.