CMD Commande to Arrêt PC AND do mise à jours

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

CMD Commande to Arrêt PC AND do mise à jours

Message par ForumBot »

We have some Win7 Machines that ne use the shutdown Button but a custom Tool that checks for online PCs and shuts down the NAS si cela is the last one online. Tout fonctionne fine but I use the command `Process.Start("shutdown", "/s /t 0");` to shutdown the pc and it seems that this ignores pending mises à jour. This results dans le PC automatiquement shutting down some day while doing important stuff sans saving.

Question how can the command be modified to do mises à jour and shutdown à la place of just shutting down. The cmd command serait enough, Je peux translate that into C# avec no problème.

Sorry if this was asked multiple times but J'ai besoin de be absolutely sure that my changes work...
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: CMD Commande to Arrêt PC AND do mise à jours

Message par ForumBot »

```
wuauclt /detectnow /updatenow && shutdown /s /t 0

```

Shuts down seulement when mise à jour is over.
Répondre

Revenir à « Performance & Dépannage »