Screwed shutdown script


  1. Posts : 242
    Win 10 Pro 64 V22H2 Build 19045.2728
       #1

    Screwed shutdown script


    Oh Boy, well you learn from your mistakes they say

    I tried to run a script at shutdown on my W10 PC that would run a RoboCopy command. That did not work so I deleted it (So I thought) I may have deleted the proper shutdown script as my PC will no longer shutdown but my incorrect script is still in Win\Sys32\GP\Machine\Scripts\shutdown.

    Can I return the correct script and if so what is it and would I simply copy and paste in the right folder? I really do not want to do a new install or system Image recover.

    Smack on the wrist time I think
      My Computer


  2. Posts : 471
    Windows 10 Pro
       #2

    Well, on my system those folders are empty. What about deleting your incorrect script and trying it again? In case you need a temporary solution, the command in cmd to shutdown is "%windir%\System32\Shutdown.exe /s /t 0" (without ""), hybrid shutdown is "%windir%\System32\Shutdown.exe /s /hybrid /t 0" and restart would be "%windir%\System32\Shutdown.exe /r /t 0". I hope this helps.
      My Computer


  3. Posts : 14,046
    Windows 11 Pro X64 22H2 22621.1848
       #3

    See if what you deleted is in the Recycle Bin?
      My Computers


  4. Posts : 242
    Win 10 Pro 64 V22H2 Build 19045.2728
    Thread Starter
       #4

    Thanks for the suggestions.
    Deleted my script but made no difference, just get the 'Shutting Down' and revolving balls! and still wont shutdown. The weekly clean up meant my recycle bin was emptied the day I messed up so no file to restore

    However as luck would have it I have a System Image from the same morning before I screwed up so will have a go at restoring that using the tutorial. Hopefully that will reinstate any script controlling the shutdown, if that fails I will make some desktop shortcuts using the details above.
      My Computer


  5. Posts : 471
    Windows 10 Pro
       #5

    Restoring a system image should definitely fix this. I'm still wondering what you could possibly have deleted given the fact that on my system the folder you indicated is empty. Could this be an unfortunate coincidence and the cause for your problem is something else? Does shutdown using the above mentioned commands work?
      My Computer


  6. Posts : 242
    Win 10 Pro 64 V22H2 Build 19045.2728
    Thread Starter
       #6

    PC would not shutdown or restart, I will have to search the Tutorials again as I could not find one relating to Installing from a WindowsImageBackup, only how to create one. Has to be there somewhere!

    I found resets, system restore, repair, refresh to name a few.

    After much printing and reading I decided on a 'Repair Install with an in-place upgrade' as this seemed the most appropriate. Following this, W10 is back to normal, shutting down and restarting as it should. I was impressed using this route as all my settings, programs and such like all were as before.

    I have also two new icons on my desktop, one for Shutdown and one for Restart. Thank you for the text in your earlier post
      My Computer


  7. Posts : 471
    Windows 10 Pro
       #7

    Good to hear that you were able to fix the issue.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 23:46.
Find Us




Windows 10 Forums