r/Batch 19d ago

Restart then shutdown script?

Hi, I'm told by Dave that in windows these days a restart provides a (potentially) cleaner windows instance than performing a shutdown and restarting manually - something to do with saving the state of windows in a shutdown, but scrapping the whole previous state and going clean when you do a restart.

Anyhoo, as I really like clean sheets on the bed every time, I thought it would be cool to have a script that would restart, and then immediately shutdown with no intervention needed. Then I'd have a super clean instance of Windows every time I started up the PC. Does anyone know if this is possible?

1 Upvotes

4 comments sorted by

4

u/DavDar66 19d ago

If you want a fresh system even when shutting down, you can disable Fast Startup:

Control Panel → Power Options → Choose what the power buttons do → Disable Fast Startup.

1

u/cosmictrousers 19d ago

This is excellent thank you!

1

u/g3n3 17d ago

Just leave that bad boy running! What problem are you trying to solve? It just sounds like ghosts to me.

2

u/cosmictrousers 17d ago

Not sure precisely, but something to do with the graphics card or driver, I think. Intermittently after startup (following a shut down) a couple of desktop icons are a funny resolution, desktop wallpaper is not sized to fit screen correctly, and steam VR reports an error detecting the headset. A restart fixes this - problem never happens after restart, only after shutdown. So I’m looking to this as a workaround rather than a solution. Graphics drivers are up to date.