[python-win32] Detect if user has a window opened in full screen mode?

2008-08-21 Thread Patrick Li
Hi, Is there a way I can detect whether or not the user has any window that is running in full screen mode? (Playing a game that takes up the entire screen, or having the browser maximized, etc) Thanks, Patrick ___ python-win32 mailing list python-win32

[python-win32] how to obtain list of connected IP/port pairs on user's computer?

2008-09-07 Thread Patrick Li
Hi, I'm interested in writing a function that returns me the list of IP/port that the user's machine is connected to. The most naive way is to run netstat -na on the user's computer and just parse the stdout. Are there libraries I can call to achieve this as opposed to running an external comman

[python-win32] idle detection on system?

2008-09-22 Thread Patrick Li
Hi, Does anyone know how I can detect if a system is idle? By idle I am referring to a user being away from the computer (no keyboard or mouse movement) for X minutes. Tried searching around but I haven't found anything that mentions how I can hook into these two events. Thanks in advance, Patri

[python-win32] How to launch an executable in elevated mode on Vista with UAC on?

2009-03-02 Thread Patrick Li
Hello, I have a python program that needs to launch an executable (it is an installer executable) that requires admin privileges. This works fine on XP and Vista machines where UAC is turned off. On Vista machines with UAC on, however, it doesn't appear to allow the program to launch the executab

[python-win32] Detect when the user launches or closes a program?

2007-11-19 Thread Patrick Li
Hi, I am trying to write a program that will perform some operation on the user's computer when the user launches a particular executable(s) on the computer and when the user closes them. One way to achieve this is by polling the process table periodically and checking to see if one of the runnin

Re: [python-win32] Detect when the user launches or closes a program?

2007-11-19 Thread Patrick Li
On 11/19/07, bob gailer <[EMAIL PROTECTED]> wrote: > > Patrick Li wrote: > > Hi, > > > > I am trying to write a program that will perform some operation on the > > user's computer when the user launches a particular executable(s) on > > the computer

[python-win32] setting my windows service as automatic instead of manual

2007-11-28 Thread Patrick Li
Hi, I have created a simple windows service using win32serviceutil. I was able to use py2exe to turn it into a windows executable successfully. However, I cannot figure out how I can get the startup type of this service to "automatic" instead of "manual". I understand that I can go through the

[python-win32] How to get command line parameters of running processes via pywin32

2007-12-05 Thread Patrick Li
Hi, I am interested in scanning the user's process table periodically and getting the list of running process names as well as their command line parameters. For the process names, I am able to get the list of pids using win32process.EnumProcesses and then use win32api.OpenProcess and win32proces

[python-win32] Check if user has windows administrator privilege

2008-01-14 Thread Patrick Li
Hi, Does anyone know if there's a way to programmatically check to see if a user has windows administrator privilege? I need this to work in WinXP and Vista. Thanks in advance, Patrick ___ python-win32 mailing list python-win32@python.org http://mail.p

[python-win32] win32api.GetShortPathName() leaks memory?

2008-05-17 Thread Patrick Li
Hi, I'm running into some memory leak issue when running the win32pi.GetShortPathName function. Basically I've got a daemon that will perform this function on lots of long windows path names. Over time, it looks like the memory footprint increases substantially. You can reproduce it by simply l