Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Déconnection Win XP

3 réponses
Avatar
Jacques \(BE\)
Bonjour,

j'essaie de trouver le bon code pour fermer une session Win XP
au lieu de fermer Win XP ...

Set objWMIServiceF =
GetObject("winmgmts:{impersonationLevel=impersonate,(Shutdown)}\\" _
& strComputer & "\root\cimv2")

Set colOperatingSystems = objWMIServiceF.ExecQuery ("Select * from
Win32_OperatingSystem")

For Each objOperatingSystem in colOperatingSystems
objOperatingSystem.Win32Shutdown(1)
Next



Merci de vos réponses

Jacques

3 réponses

Avatar
Gilles LAURENT
"Jacques (BE)" a écrit dans le message de
news:%23R%
| Bonjour,

Bonjour,

| j'essaie de trouver le bon code pour fermer une session Win XP
| au lieu de fermer Win XP ...
|
| Set objWMIServiceF | GetObject("winmgmts:{impersonationLevel=impersonate,(Shutdown)}" _
| & strComputer & "rootcimv2")
|
| Set colOperatingSystems = objWMIServiceF.ExecQuery ("Select * from
| Win32_OperatingSystem")
|
| For Each objOperatingSystem in colOperatingSystems
| objOperatingSystem.Win32Shutdown(1)
| Next
|
|
|
| Merci de vos réponses
|
| Jacques

Logoff :
objOperatingSystem.Win32Shutdown (0)

Forced Logoff :
objOperatingSystem.Win32Shutdown (4)

--
Gilles LAURENT
http://glsft.free.fr
Avatar
Méta-MCI
Bonsoir !


Autre solution, en invite de commande : shutdown /l (l comme Louis)


@+

MCI
Avatar
Jacques Barathon [MS]
"Méta-MCI" wrote in message
news:

Autre solution, en invite de commande : shutdown /l (l comme Louis)


... ou comme logoff, peut-être? :-)

Jacques