| Tim Golden wrote:
| ...
| > Yes, sorry about that, it's a well-known (to me) gotcha.
| > Basically there's no way I can extract the params from
| > the COM interface in a way which implies order, so I
| > can't take them in positionally. (Corrections to this
| > statement will be gratefully recei
Tim Golden wrote:
...
> Yes, sorry about that, it's a well-known (to me) gotcha.
> Basically there's no way I can extract the params from
> the COM interface in a way which implies order, so I
> can't take them in positionally. (Corrections to this
> statement will be gratefully received).
>
> TJG
[placid]
| > Now i was trying to use service.ChangeStartMode but each
| time i pass in
| > an argument i get the error;
| >
| > #TypeError: __call__() takes exactly 1 argument (2 given)
| >
| > but;
| >
| > >>> print service.ChangeStartMode
| > (ReturnValue)>
| >
| > ChangeStartMode needs an argu
placid wrote:
> Tim Golden wrote:
> > [placid]
> > | Using Tim Golden's wmi module you can get the service names
> > |
> > | import wmi
> > | c = wmi.WMI ()
> > | stopped_services = c.Win32_Service (StartMode="Auto", State="Stopped")
> > | if stopped_services:
> > | for s in stopped_services:
>
Tim Golden wrote:
> [placid]
> | Using Tim Golden's wmi module you can get the service names
> |
> | import wmi
> | c = wmi.WMI ()
> | stopped_services = c.Win32_Service (StartMode="Auto", State="Stopped")
> | if stopped_services:
> | for s in stopped_services:
> | print s.Caption, "service
At Wednesday 27/9/2006 01:39, placid wrote:
Using Tim Golden's wmi module you can get the service names
but how do i start services that are stopped?
Surely there are fancier ways:
>net start servicename
Gabriel Genellina
Softlab SRL
__
[placid]
| Using Tim Golden's wmi module you can get the service names
|
| import wmi
| c = wmi.WMI ()
| stopped_services = c.Win32_Service (StartMode="Auto", State="Stopped")
| if stopped_services:
| for s in stopped_services:
| print s.Caption, "service is not running"
| else:
| print "N
Hi all,
Using Tim Golden's wmi module you can get the service names
import wmi
c = wmi.WMI ()
stopped_services = c.Win32_Service (StartMode="Auto", State="Stopped")
if stopped_services:
for s in stopped_services:
print s.Caption, "service is not running"
else:
print "No auto services stop