L’arrêt de Windows à partir de l’invite de commande provoque-t-il des dégâts?

Table des matières:

L’arrêt de Windows à partir de l’invite de commande provoque-t-il des dégâts?
L’arrêt de Windows à partir de l’invite de commande provoque-t-il des dégâts?

Vidéo: L’arrêt de Windows à partir de l’invite de commande provoque-t-il des dégâts?

Vidéo: L’arrêt de Windows à partir de l’invite de commande provoque-t-il des dégâts?
Vidéo: How to Reset the Samsung SmartThings Motion Sensor - YouTube 2024, Avril
Anonim
La plupart d'entre nous utilisons le menu Démarrer pour arrêter notre système Windows, mais est-il possible de causer des dommages si vous choisissez d'utiliser la ligne de commande à la place? Existe-t-il des commandes particulières susceptibles d’endommager les autres? L’article d’aujourd’hui sur le SuperUser Q & R répond aux questions d’un lecteur inquiet.
La plupart d'entre nous utilisons le menu Démarrer pour arrêter notre système Windows, mais est-il possible de causer des dommages si vous choisissez d'utiliser la ligne de commande à la place? Existe-t-il des commandes particulières susceptibles d’endommager les autres? L’article d’aujourd’hui sur le SuperUser Q & R répond aux questions d’un lecteur inquiet.

La séance de questions et réponses d’aujourd’hui nous est offerte par SuperUser, une sous-division de Stack Exchange, un groupe de sites Web de questions-réponses dirigé par la communauté.

Capture d'écran fournie par Acid Pix (Flickr).

La question

Lecteur superutilisateur FlipFloop veut savoir si l’utilisation de Windows CMD pour éteindre un ordinateur peut causer des dommages:

When you launch shutdown -i to shut down a computer via the command prompt (CMD), does it damage the computer that is being turned off (either locally or remotely)?

L'utilisation de Windows CMD pour éteindre un ordinateur provoque-t-elle des dommages?

La réponse

Les contributeurs du super-utilisateur, Marco Bonelli et LPChip, ont la solution pour nous. Tout d'abord, Marco Bonelli:

The shutdown command in Windows performs a normal shutdown/reboot/logoff on the computer (locally or remotely). If you closed all of your running programs and saved your files, there is no difference between running any shutdown command (with any parameter) or using the Windows interface via the Start Menu. The command does not damage the computer or file system in any way.

More About Running Programs

If any programs preventing the shutdown are running, Windows will automatically try to terminate them and, if that is not possible, will prompt you about it. The only problem you can have here arises with programs performing unsaved changes to files. If they provide an automatic recovery of improperly closed sessions like Microsoft Office for example, they will save their state to recover it on the next start, otherwise you will lose the unsaved data.

Suivi de la réponse de LPChip:

No, it will not. When you use the Start Menu to shut down a computer, it will also use the same shutdown command, just with different parameters.

The shutdown -i option was made to expose features that the Windows Start Menu does not offer without use of the Command Line. For example, shutdown -i can be used to send a shutdown command to another computer.

In the same fashion that shutdown -i will not damage your computer, neither will shutdown -s -t 0.

There is also the -f option, which is used to force a shutdown. This will not damage your Windows system, but it may cause any unsaved data (such as an unsaved open word document) to be lost.

Normally, Windows will show you a dialog of some sort like, “There is a program preventing shutdown. Do you want to cancel or continue anyway?” A timeout will eventually abort the shutdown. With the -f option, instead of showing you the message, it will assume that you wish to continue anyway and close any remaining programs.

Avez-vous quelque chose à ajouter à l'explication? Sound off dans les commentaires. Voulez-vous lire plus de réponses d'autres utilisateurs de Stack Exchange doués en technologie? Découvrez le fil de discussion complet ici.

Conseillé: