No cache version.

Caching disabled. Default setting for this page:enabled (code LNG204)
If the display is too slow, you can disable the user mode to view the cached version.

Vous devez être membre et vous identifier pour publier un article.
Les visiteurs peuvent toutefois commenter chaque article par une réponse.

Raccourci pour quitter Windows

Astuces de l’Infobrol (Windows (Généralités))Article publié le 12/02/2005 16:58:39


Il est possible d'arrêter le système par des raccourcis, ou par un VBScript.

Nous allons créer un document texte à l'aide du bloc-notes (notepad).
Ce fichier doit contenir les informations suivantes:




Const LOGOFF = 0
Const SHUTDOWN = 1
Const REBOOT = 2
Const FORCE = 4
Const POWEROFF = 8
Set wmi = GetObject("winmgmts:{(Shutdown)}")
Set objset = wmi.instanceof("win32_operatingsystem")
for each obj in objset
set os = obj : exit For
next
os.win32shutdown SHUTDOWN





Nous devons ensuite enregistrer ce fichier avec l'extension .vbs.

C'est en modifiant l'instruction os.win32shutdown SHUTDOWN que nous déterminons l'action à entreprendre.

  • LOGOFF ferme la session en cours sans quitter Windows.

  • SHUTDOWN ferme Windows sans éteindre l'ordinateur.

  • REBOOT redémarre l'ordinateur.

  • FORCE ferme les applications.

  • POWEROFF ferme Windows et éteint l'ordinateur.


Avatar :: Steph Un article de Steph

Source : indéterminée


Sélection, tri et recherche d'articles
FILTRER :
TRIER :1er critère : 2e critère :
CHERCHER : Dans les titres Dans le contenu


[Afficher les liens en fonction des critères du formulaire ci-dessus]

English translation

You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.

If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.

Thank you in advance.

Document created the 13/09/2004, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/ast-rf-218.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.