Windows 10: Windows 10 Home Shutdown Script

Discus and support Windows 10 Home Shutdown Script in Windows 10 Customization to solve the problem; Is it possible to run a script on shutdown on Windows 10 Home edition? Group Policy Editor (gpedit.msc) is not available. Already tried to modify... Discussion in 'Windows 10 Customization' started by peoman, Nov 26, 2015.

  1. peoman Win User

    Windows 10 Home Shutdown Script

    peoman, Nov 26, 2015
    #1

  2. Restart through USOOrchestrator-Service ignores any GPO-Shutdown-settings

    If you update your Windows (10/2016) through the new interface, at the end, there's a "Restart Now"-button. If you click that, the USOOrchestrator-Service initiates a Restart, thereby ignoring any configured GPO-Shutdown-settings such as a shutdown script.
    If you don't click that button, but initiate a Restart yourself manually, e.g. shutdown /r /t 0, the shutdown-script runs. This is really cumbersome, as you want a shutdown-script to always run, regardless of how a user initiates a shutdown/restart.... Please
    fix this in a future-update!
     
    Bart van de Beek, Nov 26, 2015
    #2
  3. Windows 10 and Shutdown after Creator's Update

    Hello Community!

    I'm hoping soemone can enlighten me as to what the people of Microsoft have changed about the shutdown process after Creator's Update.

    I still make use of shutdown script heavily to do stuff which needs to happen on a regular basis, and I use them because that is what my customers want - stuff that needs to happen regularly (like installing Windows updates, copying files to network shares
    at the end of the day) needs to happen when it doesn't interfere with my customer's work - and this is precisely when they shut down their computers at the end of the day. And you kow what it's like in the modern world of work, the end of the day can mean
    many things, be it 3PM, 5PM or 7PM, so running a scheduled task at say 7PM is not gonna do it, I need something that automatically happens when a user shuts down their computer, doesn't matter when that is, so shutdown scripts it is.

    Anyway, I'm digressing. I've been making use of shutdown scripts ever since Windows XP, and Windiws 10 has never given me any trouble until the Creator's Update, shutdown scripts ran just like they did on XP or 7.

    With Creator's Update, at first there was a problem described by another user here:

    After installing Creators Update of Windows 10, logoff script can't be run correctly

    Apparently, Microsoft have fixed this issue with a patch, the problem went away with KB4025342 in July 2017, shutdown scripts are once again displayed normally.

    But I'm still facing the issue that apparently MS has changed the way network connections are handled when shutting down a computer. From Windows XP to Windows 10 1493, network connections would have been available during shutdown scripts, which is no longer
    the case in the current build.

    Many of my scripts fail to run properly, and by testing a lot I narrowed it down to a simple issue: Network is shut down by Windows 10
    before shutdown scripts get to run. You can see that for instance by just putting "ipconfig /renew" into a shutdown script and then a pause, and you will see the error message you'll get when your network is disconnected:

    "no operation can be performed on <name of connection> while it has its media disconnected".

    And this for network connections which should clearly be up and were up and running before starting to shut down my computer.

    In a nutshell, my two questions:

    1) Is there any overview somewhere about what exactly Microsoft has changed about the shutdown process in Windows 10 15063 so I can react accordingly?

    2) Is there any way I can reestablish network connections Windows has already shut down, e.g. by some commands I could put in my shutdown scripts? Thanks a lot guys!
     
    Baedamichi, Nov 26, 2015
    #3
  4. grismar Win User

    Windows 10 Home Shutdown Script

    Better late than never, I suppose.

    Since I only needed a script to run when a user was logged in and a (hybrid or otherwise) shutdown started, I was able to solve the problem using AutoHotKey. You can get AutoHotKey here: AutoHotkey

    My specific problem is I wanted to dismount VeraCrypt volumes before a hybrid shutdown and this is the script I used (easily modified, read the comments):

    Code: ; run_before_shutdown.ahk, 2017-05-09, ; restart as admin, if not running as admin if not A_IsAdmin { Run *RunAs "%A_ScriptFullPath%" ; exit, as new instance takes over ExitApp } ; ensure only one instance of the script is running at any one time #SingleInstance, Force ; optionally, hide the icon from the system tray ; #NoTrayIcon ; On WM_QUERYENDSESSION event (before shutdown), run OnShutDown callback. OnMessage(0x11, "OnShutDown") return OnShutDown(){ ; Run your command, in my case a silent dismount of VeraCrypt volumes Run, "C:\Program Files\VeraCrypt\VeraCrypt.exe" /s /q /d ExitApp }[/quote] Note: running the script will cause a UAC dialog to appear, asking for admin privileges; that's how I like it, but you could get it to run as admin with a (somewhat insecure) shortcut / batch file.

    Note: I start this script as part of a batch that also mounts some drives I want to auto-dismount, but you could run it on Windows startup for a specific user (AutoHotKey doesn't run if no user is logged on).
     
    grismar, May 8, 2017
    #4
  5. Sawuwaya Win User
    I do not know for sure...

    Did you try to get a copy of gpedit.msc and throw it into the Windows 10 directory to see it it "sticks"?

    I cannot state for sure 100%, but I do not see why that won't work for you.
     
    Sawuwaya, May 10, 2017
    #5
  6. grismar Win User
    There are various threads about the lack of a policy editor (or editable policies for that matter) on Windows 10 Home. Like Brink mentions in this thread Policy Editor Not Available In Win 10 Home Edition Solved - Windows 10 Forums :

    "I find that trying to add Group Policy to an unsupported edition usually ends in disaster."

    My experience is similar. And that's apart from the fact that you're adding stuff from Windows versions you didn't pay for to a Windows version that doesn't support it. That's just a baby step away from running a pirated version.

    Also, both the OP and myself indicated that we tried various alternative solutions that ended up not working, or not working correctly or reliably. Why exactly the policy editor was kept absent from 10 Home is only for Microsoft engineers to know, but it seems there's technical reasons as well as commercial ones...
     
    grismar, Apr 5, 2018
    #6
Thema:

Windows 10 Home Shutdown Script

Loading...
  1. Windows 10 Home Shutdown Script - Similar Threads - Home Shutdown Script

  2. startup and shutdown scripts

    in AntiVirus, Firewalls and System Security
    startup and shutdown scripts: my computer is being deployed to and i cant find help ANYWHERE. need to know if startup scripts can help me??? https://answers.microsoft.com/en-us/windows/forum/all/startup-and-shutdown-scripts/0a5a1b22-cdd8-4811-9452-08970cfa80e7
  3. Gpedit shutdown scripts on win 10 home?

    in Windows 10 Ask Insider
    Gpedit shutdown scripts on win 10 home?: ok i'm stuck on this problem: i want to run a sample file.bat when my pc shuts down. I have added gpedit.msc on my machine via some batch file and added my .bat script in there. For some reason it won't execute the script when i shutdown my pc. I think is because i have win10...
  4. Shutdown / logoff script just wont run Windows 10 Home

    in Windows 10 Ask Insider
    Shutdown / logoff script just wont run Windows 10 Home: I am trying to run a simple powershell script to turn off my office hue lights when I logoff/ shutdown my windows 10 home PC. I know Home isnt fully supported as shipped to complete this but searching around tinterweb there seems to be "ways" to get this to work. I am having...
  5. Windows 10 Shutdown script not performing Windows backup

    in Windows 10 BSOD Crashes and Debugging
    Windows 10 Shutdown script not performing Windows backup: This script performed under Windows 7 Pro perfect for years. Group Policy etc. is modified to run the script on shutdown see script. Now I changed to Windows 10 Pro new hardware and got into one Problem. Running the script with adminrights while logged in works fine....
  6. Powershell Script on Shutdown

    in Windows 10 Performance & Maintenance
    Powershell Script on Shutdown: Hi all, I try to run a Powershell Script (*.ps1) when i shut down my PC. I created the script and it is working fine when i run it. However if i want to run it on a regular Shutdown it seems like it does not start or is not finished, before Windows is killing every running...
  7. Shutdown Script Not Working

    in Windows 10 Performance & Maintenance
    Shutdown Script Not Working: Hi, Following this article How to empty the Windows Recycle Bin automatically - gHacks Tech News I created the batch script, which works, and added to Shutdown scripts via GPE. But, it does not run at shutdown. I have 2 accounts and 2 drives on the laptop, Local Admin and...
  8. Script to stop Windows 10 Home services

    in Windows 10 BSOD Crashes and Debugging
    Script to stop Windows 10 Home services: Hello, Please be sure to give me a script to automatically shut down Windows 10 Home services. Thank you! Wait for response! A good day! https://answers.microsoft.com/en-us/windows/forum/all/script-to-stop-windows-10-home-services/077e07f6-2057-4c59-9333-1e7e7b375b45
  9. Script Error in Windows 10 Home

    in Windows 10 Support
    Script Error in Windows 10 Home: What is it with script error showing up in Windows 10 now? Never had it before since I've had Ten the past few months. Also, I notice my text is very small, although, I have it set at Largest size. This all changed yesterday..2/2016 39585
  10. Screwed shutdown script

    in Windows 10 Support
    Screwed shutdown script: Oh Boy, well you learn from your mistakes they say*Redface 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...

Users found this page by searching for:

  1. windows 10 home shutdown run

    ,
  2. shutdown script windows 10

    ,
  3. windows 10 home shutdown script