Windows 10: Windows 10 Shutdown script not performing Windows backup

Discus and support Windows 10 Shutdown script not performing Windows backup in Windows 10 BSOD Crashes and Debugging to solve the problem; 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... Discussion in 'Windows 10 BSOD Crashes and Debugging' started by Markus@Microsoft, Dec 30, 2019.

  1. 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.

    Running the script on shutdown the script starts well but when it comes to ...

    The lines where the task scheduler is modified result with success "C:\Windows\System32\schtasks.exe … "Microsoft\Windows\WindowsBackup\AutomaticBackup"".

    But the backup seems to be not started and the processes VSSVC.exe and wbadmin.exe are not active.

    After starting Windows again there is no message that the backup was interrupted.


    Is there someone having any ideas?




    SCRIPT:

    @echo off

    REM ================================
    REM Notwendige Windows-Einstellungen
    REM ================================
    REM Script beim Herunterfahren ausführen
    REM lokale Gruppenrichrtlinien gpedit.msc > Computerkonfiguration > Windows-Einstellungen > Skripts Start/Herunterfahren > Herunterfahren > Eigenschaften > Scripts > Hinzufügen > "D:\1Daten\MyProgs\ShutdownBackup\ShutdownBackup.cmd"
    REM wenn zusätzlich bei jedem Shutdown ein Systemwiederherstellungspunkt erstellt werden soll entsprechende Zeile in diesem Script aktivieren Dauer ca. 5 Minuten
    REM
    REM Script sichtbar machen
    REM lokale Gruppenrichrtlinien gpedit.msc > Computerkonfiguration > Administrative Vorlagen > System > Skripts > Anweisungen in Abmeldeskripts während der Ausführung anzeigen > Aktiviert
    REM
    REM Script Wartezeit anpassen
    REM lokale Gruppenrichrtlinien gpedit.msc > Computerkonfiguration > Administrative Vorlagen > System > Skripts > Maximale Wartezeit für Script ... > 600s => 12000s
    REM
    REM Energieoptionen anpassen
    REM Systemsteuerung > Energieoptionen > Auswählen, was beim Drücken des Netzschalters geschehen soll > Einige Einstellungen sind momentan nicht verfügbar > Schnellstart aktivieren > deaktivieren
    REM ================================


    ECHO =========================================
    ECHO Energiesparmodus "Hoechstleistung" setzen
    ECHO =========================================
    powercfg /S "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c"
    ECHO.
    ECHO.

    ECHO ===================================================
    ECHO Backup "Datensicherung der Aufgabenplanung starten"
    ECHO ===================================================
    ECHO AutomaticBackup /ENABLE
    C:\Windows\System32\schtasks.exe /CHANGE /TN "Microsoft\Windows\WindowsBackup\AutomaticBackup" /ENABLE
    ping -n 10 localhost>NUL
    ECHO.
    ECHO AutomaticBackup /RUN
    C:\Windows\System32\schtasks.exe /RUN /TN "Microsoft\Windows\WindowsBackup\AutomaticBackup"
    ping -n 10 localhost>NUL
    ECHO.
    ECHO AutomaticBackup /DISABLE
    C:\Windows\System32\schtasks.exe /CHANGE /TN "Microsoft\Windows\WindowsBackup\AutomaticBackup" /DISABLE
    ECHO.
    ECHO 10s warten, Prozess VSSVC.exe wird gestartet ...
    ping -n 10 localhost>NUL
    :SICHERUNG_AKTIV
    ECHO Warten bis Prozess VSSVC.exe beendet wird ...
    :LOOP1
    tasklistfindstr /i "VSSVC.exe">NUL && ping -n 10 localhost>NUL & goto:LOOP1
    ECHO Prozess VSSVC.exe beendet
    ECHO.
    ECHO.
    echo Datensicherung beendet
    ECHO.
    ECHO.

    ping -n 10 localhost>NUL
    ECHO Warten bis Prozess wbadmin.exe beendet wird ...
    :LOOP2
    tasklistfindstr /i "wbadmin.exe">NUL && ping -n 10 localhost>NUL & goto:LOOP2
    ECHO Prozess wbadmin.exe beendet
    ECHO.
    ECHO.
    echo Systemabbild aktualisieren beendet
    ECHO.
    ECHO.
    ECHO =======================================
    ECHO Energiesparmodus "Ausbalanciert" setzen
    ECHO =======================================
    powercfg /S "381b4222-f694-41f0-9685-ff5bb260df2e"
    ECHO.
    ECHO.

    rem pause

    GOTO ENDE

    :ABBRUCH
    echo Sicherung abgebrochen
    ECHO.
    ECHO.

    :ENDE
    ping -n 5 localhost>NUL
    EXIT

    :)
     
    Markus@Microsoft, Dec 30, 2019
    #1
  2. Ahhzz Win User

    Windows 10 Tweaks

    Pressing “Windows+Pause Break” (it’s up there next to scroll lock) opens the “System” Window.

    Windows 10: In the new version of Windows, Explorer has a section called Quick Access. This includes your frequent folders and recent files. Explorer defaults to opening this page when you open a new window. If you’d rather open the usual This PC, with links to your drives and library folders, follow these steps:

    • Open a new Explorer window.
    • Click View in the ribbon.
    • Click Options.
    • Under General, next to “Open File Explorer to:” choose “This PC.”
    • Click OK


    credit to Lifehacker.
     
    Ahhzz, Dec 30, 2019
    #2
  3. Scrizz Win User
    Windows 10

    no, you can't go back..
    I suggest creating a backup image of your os drive
     
    Scrizz, Dec 30, 2019
    #3
  4. sachind1 Win User

    Windows 10 Shutdown script not performing Windows backup

    script running on Startup and Shutdown of System is not working

    Steps

    • Open a run box
    • type in "gpedit.msc"
    • Expand Computer Configuration
    • Expand Windows Settings
    • Select Scripts (Startup/Shutdown)
    • Double click Startup
    • Click Show Files and copy/paste your file in to this folder
    • Click the Add button on the startup properties
    • Click Browse and double click on your script to choose it.
    • "OK" out of all windows to apply the new settings.
    I am generally Giving Path of My python to the startup and shutdown as steps given above
     
    sachind1, Dec 30, 2019
    #4
Thema:

Windows 10 Shutdown script not performing Windows backup

Loading...
  1. Windows 10 Shutdown script not performing Windows backup - Similar Threads - Shutdown script performing

  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. Cannot perform a backup on Windows 10

    in Windows 10 Installation and Upgrade
    Cannot perform a backup on Windows 10: Every Day I click on "Backup now" and after a while the date of last backup changes indicating today's one. Yesterday I clicked on "Back now" then I read "I am backing up data" but after that the date remain at the previous Day. So I suppose backup is not working! How...
  4. 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...
  5. Windows Defender kills my backup script?

    in AntiVirus, Firewalls and System Security
    Windows Defender kills my backup script?: Since about recently, Windows Defender started quietly killing my backup script. When I went to check, it gave me this: [ATTACH] [ATTACH] [ATTACH] This is not a "dangerous and executes commands from an attacker", this is the script that I wrote myself that...
  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. Windows 10 Home Shutdown Script

    in Windows 10 Customization
    Windows 10 Home Shutdown Script: 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 registry Execute a script a startup and shutdown Tested successfully on Windows 10 Professional but won't work on Home....
  9. Shutdown and startup performance

    in Windows 10 Performance & Maintenance
    Shutdown and startup performance: Hey guys i have a very Annoying problem after several installing windows 10 - 7 - 8 my shutdown and startup times are awful i have samsung 850 Pro on my laptop before i forced to clean install windows i have a brilliant performance (about 6-7 sec cold startup and same...
  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...