What does this key do?

Discussion in 'Windows 10' started by BladeGod, Oct 26, 2017.

  1. BladeGod

    BladeGod MDL Member

    Oct 28, 2016
    130
    58
    10
    I really don't like the new revision of Shutdown in FCU which opens apps upon resume. Shift + Shutdown which is supposed to do Full Shutdown doesn't work either. I do know other ways for this. But still, I'm looking for group policies or Reg keys that disables this behavior, at least for Shutdown.

    It does make sense for RESTART (sometimes), but why SHUTDOWN!!!

    I came across this reg key which I think probably is responsible for this behavior. So, I changed it to 1 and upon restart this key automatically resets to 0 and all the opened apps still resume themselves. Tried several times, but still the same s**t. So, before I give up, I would like to know what exactly this key does?

    Code:
    
    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shutdown]
    "CleanShutdown"=dword:00000000
    
    
    Thanks!
     
  2. TairikuOkami

    TairikuOkami MDL Expert

    Mar 15, 2014
    1,172
    1,055
    60
    Nice find, have you tried taking permissions to modify for that key, so Windows would be forced only to read it?

    Code:
    Usage: shutdown [/i | /l | /s | /sg | /r | /g | /a | /p | /h | /e | /o] [/hybrid] [/soft] [/fw] [/f]
        [/m \\computer][/t xxx][/d [p|u:]xx:yy [/c "comment"]]
        No args    Display help. This is the same as typing /?.
        /?         Display help. This is the same as not typing any options.
        /i         Display the graphical user interface (GUI).
                   This must be the first option.
        /l         Log off. This cannot be used with /m or /d options.
        /s         Shutdown the computer.
        /sg        Shutdown the computer. On the next boot,
                   restart any registered applications.
        /r         Full shutdown and restart the computer.
        /g         Full shutdown and restart the computer. After the system is
                   rebooted, restart any registered applications.
        /a         Abort a system shutdown.
    In order to fully shutdown/restart, you could try creating a shortcut like this:

    Code:
    taskkill /f /im iexplorer.exe
    taskkill /f /im gog.exe
    shutdown /s /t 00
     
  3. kaljukass

    kaljukass MDL Guru

    Nov 26, 2012
    3,396
    1,322
    120
    This key is also in version 1703, or in Windows 10 15063,
    so the problem is probably not in this key.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. BladeGod

    BladeGod MDL Member

    Oct 28, 2016
    130
    58
    10
    So what does it do? Can you check whether the key reverts to 1 after a restart in CU or AU?
     
  5. x58haze

    x58haze MDL Junior Member

    Feb 7, 2017
    65
    17
    0
    I would highly recommend to go back to the windows 10 1607 anniversary build, is less glitch than 1703 or 1709, right now Windows are under beta, taking Users feedback that are having such bad frame-rate in high end games like Battlefield 1, ARMA3, etc,etc so it is causing problems in low-mid end pc right now
     
  6. MrChris

    MrChris MDL Addicted

    Jun 23, 2007
    532
    127
    30
    maybe related to clearning swapfile/pagefile at shutdown?
     
  7. BladeGod

    BladeGod MDL Member

    Oct 28, 2016
    130
    58
    10
    I think it's not related to that since I'm not using pagefile on my laptop that has sufficient memory. It truly is a phantom that we can't disable this annoying feature as of now in any way. For now, I have to make do with a full shutdown shortcut. I'm hoping the option will be added soon.
     
  8. dhjohns

    dhjohns MDL Guru

    Sep 5, 2013
    3,262
    1,731
    120
    Just add to startup or make a scheduled task to change this key back to 1 each time, and you won't have programs starting on boot.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. BladeGod

    BladeGod MDL Member

    Oct 28, 2016
    130
    58
    10
    Tried it, ain't working. May be it isn't the right key :dunno:
     
  10. dhjohns

    dhjohns MDL Guru

    Sep 5, 2013
    3,262
    1,731
    120
    Works for me on 17025! I made a command file to change it. Make sure you have it set to run elevated.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. BladeGod

    BladeGod MDL Member

    Oct 28, 2016
    130
    58
    10
    I did run the batch file with high privilege s at log on in task scheduler. Let me try it again.

    If you don't mind can you post cmd content?
     
  12. dhjohns

    dhjohns MDL Guru

    Sep 5, 2013
    3,262
    1,731
    120
    Code:
    @Echo Off
    (cd /d "%~dp0")&&(NET FILE||(powershell start-process -FilePath '%0' -verb runas)&&(exit /B)) >NUL 2>&1
    Reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shutdown" /v "CleanShutdown" /t REG_DWORD /d "1" /f >NUL 2>&1
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. dhjohns

    dhjohns MDL Guru

    Sep 5, 2013
    3,262
    1,731
    120
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. BladeGod

    BladeGod MDL Member

    Oct 28, 2016
    130
    58
    10
    #14 BladeGod, Oct 30, 2017
    Last edited: Oct 30, 2017
    (OP)
    @dhjohns I can't run the vbs script. It throws up error. Changed the encoding, but still not running. What did I do wrong?

    If possible, please link the .vbs file. It says invalid character.
     
  15. dhjohns

    dhjohns MDL Guru

    Sep 5, 2013
    3,262
    1,731
    120
    Code:
    Dim WinScriptHost
    Set WinScriptHost = CreateObject("WScript.Shell")
    WinScriptHost.Run Chr(34) & "C:\Customizations\Startup\access.cmd" & Chr(34), 0
    Set WinScriptHost = Nothing
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. dhjohns

    dhjohns MDL Guru

    Sep 5, 2013
    3,262
    1,731
    120
    The reason I call it access.cmd etc is because I wrote a code for something else, and incorporated the reg cmd into it to save time. The reason I use vbs to cmd is because it makes the cmd window popup invisible!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...