[python-win32] wmi query.

2008-03-24 Thread mark.a.brand
hi: how do you incorporate a where clause and selected field clause in a wmi query ? this gets me caption and state fields for all services c = wmi.WMI() for service in c.Win32_Service (['Caption', 'State']) ... this gets me all fields for stopped services c = wmi.WMI() for service in c

Re: [python-win32] wmi query.

2008-03-24 Thread Marcus Low
Hi, > c = wmi.WMI() > for service in c.Win32_Service ('State == 'Stopped') I would think that using c.Win32_Service() and iterating would get you anything you want. In ur case of using ('State == 'Stopped') ... (if this ever works) c.Caption would have given you the caption Marcus. -

Re: [python-win32] Using .chm files.

2008-03-24 Thread niki
Arun v n wrote: > Im in need of using a .chm help file where .hlp help fines are curretly > being used.. > Winhelp() method is used for opening .hlp files.. Mine is a win32 > applicatio... How could I make use of HTMLHelp() method in Win32.. Is > there any specific headers and libs that I will h

Re: [python-win32] wmi query.

2008-03-24 Thread Tim Golden
mark.a.brand wrote: > hi: > > how do you incorporate a where clause and selected field clause in a wmi > query ? > > this gets me caption and state fields for all services > c = wmi.WMI() > for service in c.Win32_Service (['Caption', 'State']) > ... > > this gets me all fields for stop

Re: [python-win32] wmi query.

2008-03-24 Thread Tim Golden
mark.a.brand wrote: > hi: > > how do you incorporate a where clause and selected field clause in a wmi > query ? > > this gets me caption and state fields for all services > c = wmi.WMI() > for service in c.Win32_Service (['Caption', 'State']) > ... > > this gets me all fields for stop

Re: [python-win32] wmi query.

2008-03-24 Thread Tim Golden
mark.a.brand wrote: > hi: > > how do you incorporate a where clause and selected field clause in a wmi > query ? > > this gets me caption and state fields for all services > c = wmi.WMI() > for service in c.Win32_Service (['Caption', 'State']) > ... > > this gets me all fields for stop

[python-win32] Re: Using LogonUser with Guest account

2008-03-24 Thread Roger Upole
Giampaolo Rodola wrote: > Hi, > I'm trying to write a plug-in for a ftp server of mine to permit the > integration with accounts defined on the Windows system. > What I basically need is impersonating a user, execute e filesystem > call (e.g. create a directory via os.mkdir()) and then switch back

[python-win32] FTP Task Schedule in Python

2008-03-24 Thread K-Factory
Hi Forum, I need to automate a scheduled weekly task i.e. downloading a file from FTP. This is to be done on WINDOWS but I am unable to make any further development on this as I am stuck with the python scheduler itself. Can somebody help me with this, I just need a skeleton of code further thing