Windows 10: How to undo a batch script

Discus and support How to undo a batch script in Windows 10 Network and Sharing to solve the problem; I decided it would be a good idea to download and run a random batch script from the internet to get the ability to move files around freely, rather... Discussion in 'Windows 10 Network and Sharing' started by TekGung, Jul 25, 2020.

  1. TekGung Win User

    How to undo a batch script


    I decided it would be a good idea to download and run a random batch script from the internet to get the ability to move files around freely, rather than sticking to the presets. Microsoft, if you see this, please allow us to move and organize files as we wish and not have to keep them sorted by one of your preset functions. So the batch script caused me to gain this ability but effectively make dark mode look like a kindergartener messed with the colors when the dev wasn't looking. Basically in Dark Mode the text is staying black and the detail bar at the top stays in light mode. I need to undo this batch file, and this is the text:


    REM Activate free sorting for files in Windows 7 www.unawave.de


    REM --- 1. Step: Add keys
    REM --- 1a for General Folders
    REG ADD "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{5C4F28B5-F869-4E84-8E60-F11DB97C5CC7}" /v FFlags /t REG_DWORD /d 0x43000001 /f
    REG ADD "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{5C4F28B5-F869-4E84-8E60-F11DB97C5CC7}" /v Mode /t REG_DWORD /d 0x00000004 /f

    REM --- 1b for Documents Folders
    REG ADD "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{7D49D726-3C21-4F05-99AA-FDC2C9474656}" /v FFlags /t REG_DWORD /d 0x43000001 /f
    REG ADD "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{7D49D726-3C21-4F05-99AA-FDC2C9474656}" /v Mode /t REG_DWORD /d 0x00000004 /f

    REM --- 1c for Music Folders
    REG ADD "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{94D6DDCC-4A68-4175-A374-BD584A510B78}" /v FFlags /t REG_DWORD /d 0x43000001 /f
    REG ADD "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{94D6DDCC-4A68-4175-A374-BD584A510B78}" /v Mode /t REG_DWORD /d 0x00000004 /f

    REM --- 1d for Picture Folders
    REG ADD "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{B3690E58-E961-423B-B687-386EBFD83239}" /v FFlags /t REG_DWORD /d 0x43000001 /f
    REG ADD "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{B3690E58-E961-423B-B687-386EBFD83239}" /v Mode /t REG_DWORD /d 0x00000004 /f

    REM --- 1e for Videos Folders
    REG ADD "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{5FA96407-7E77-483C-AC93-691D05850DE8}" /v FFlags /t REG_DWORD /d 0x43000001 /f
    REG ADD "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{5FA96407-7E77-483C-AC93-691D05850DE8}" /v Mode /t REG_DWORD /d 0x00000004 /f

    REM --- 2. Step: Export everything under the key AllFolders in a separate file AllFolders.reg
    REG EXPORT "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders" AllFolders.reg

    REM --- 3. Step: Delete everything under the key Bags
    REG DELETE "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags" /f

    REM --- 4. Step: Import again exported file AllFolders.reg
    REG IMPORT AllFolders.reg

    REM --- 5. Step: Delete exported file AllFolders.reg
    del AllFolders.reg


    Can someone please help me by sending me an "undone" version of this that will effectively reverse the effect? Much appreciated. I found a solution in another forum but I have no clue what the person is talking about and would like some assistance.


    Many Thanks.

    :)
     
    TekGung, Jul 25, 2020
    #1
  2. Julivgar Win User

    Netfix Batch Script- Fix internet connection

    Somebody please try my batch script Netfix and leave feedback so I can improve it. thank you!

    My goal is to make a troubleshooter to help the built in "Windows Network Diagnostics" fix internet connection problems. How can you help?

    1. Download/copy the code on notepad then save as "Netfix.bat" or "Netfix.cmd"

    2. Test the Batch script

    3. Provide feedback and/or suggestions

    Thank you!
     
    Julivgar, Jul 25, 2020
    #2
  3. yegorsw Win User
    Run the audio troubleshooter from a batch script

    I have an automated home theatre setup - a batch script that enables my TV as a display, and changes the TV to be my primary display (so games and apps open on my TV instead of my monitor).

    The same script also changes my default audio device to be the TV.

    The problem is every time I turn off my TV, it disappears from the list of audio output devices in Windows 10, and even when I turn it back on, it does not appear in the list. However, if I RIGHT CLICK on the audio icon and select "troubleshoot sound problems"
    and immediately cancel/close the troubleshooter, the TV is automagically added to my list of output devices.

    My question is - is there any way to have this troubleshooter be launched from a batch script and instantly closed? Alternatively, is there a way to force a refresh of the audio devices through a batch script?
     
    yegorsw, Jul 25, 2020
    #3
  4. How to undo a batch script

    Running PowerShell script as a batch file

    Hello Baldo,



    Thank you for writing to Microsoft Community Forums.



    I understand that you want to execute the PowerShell commands as a batch file.



    I tried executing the batch file on my machine but I was unable to execute it as the command was incomplete. However, after making some changes in the command I was able to execute the batch file.



    You can try the following command by saving it in a batch file and check if that helps.



    powershell –Command Get-AppxPackage Microsoft.3dBuilder | Remove-AppxPackage



    Also, as the query is related to running a PowerShell script using a batch file, I suggest you to post the issue on

    TechNet
    forums where we have professionals who have more knowledge about the issue.



    Hope it helps.



    Regards,

    Prakhar Khare

    Microsoft Community – Moderator
     
    Prakhar_Khare, Jul 25, 2020
    #4
Thema:

How to undo a batch script

Loading...
  1. How to undo a batch script - Similar Threads - undo batch script

  2. Batch scripting

    in Windows 10 Software and Apps
    Batch scripting: Hi, here's the code that I used for 3 DISM commands to start automatically after pressing a key:Code and result:Code:@echo off echo You are going to use DISM. echo 1. To check the image. echo 2. Scan your PC's health echo 3. Restore your PC'S health. echo To continue, press...
  3. Batch scripting

    in Windows 10 Gaming
    Batch scripting: Hi, here's the code that I used for 3 DISM commands to start automatically after pressing a key:Code and result:Code:@echo off echo You are going to use DISM. echo 1. To check the image. echo 2. Scan your PC's health echo 3. Restore your PC'S health. echo To continue, press...
  4. Batch scripting

    in Windows 10 Network and Sharing
    Batch scripting: Hi, here's the code that I used for 3 DISM commands to start automatically after pressing a key:@echo off echo You are going to use DISM. echo 1. To check the image. echo 2. Scan your PC's health echo 3. Restore your PC'S health. echo To continue, press any key. echo Before...
  5. PageFile.sys batch script

    in Windows 10 Virtualization
    PageFile.sys batch script: Hello, I need help writing a batch script that would configure Windows Virtual Memory based on the amount of RAM installed If you have 4 GB of RAM, set virtual memory to 8 GB (Custom size: set both initial and maximum size to 8192) If you have 8 GB of RAM, set virtual memory...
  6. Batch Rename Script Help!

    in Windows 10 Support
    Batch Rename Script Help!: Hello! I am very new to this and need a little help. I am trying to create a batch file that will rename files that are called png_X.png (the X being the number page it is). The code I have is below. It works fine with out the pipe sort command but it sorts the by the ones...
  7. Batch Scripts / Programs.

    in Windows 10 Performance & Maintenance
    Batch Scripts / Programs.: The members and quests who use this forum know how professional, informative and helpful it is! In order to help members solve their problems/issues we often ask them to run certain programs and perform certain tasks and then upload [ post ] the results to the forum for us...
  8. Batch scripting problems

    in Windows 10 Ask Insider
    Batch scripting problems: So i found a bug. In batch scripting, I can only store 3 variables. I don't know the cause for this. Here's the code, if you need it. @ echo off title Elevator OS by Lackmey on YouTube and Reddit set gdata=No data found (this one works) set 1data=No data found (this one...
  9. Automatically Run Batch Script

    in Windows 10 Installation and Upgrade
    Automatically Run Batch Script: Hi everyone When the windows installation is finished, automatically run batch script. How can I do that? Thanks *Wink 122531
  10. Batch script question

    in Windows 10 Support
    Batch script question: Hello, I want make a batch script to delete a spefic folder on the C disk, but how can I get only that spefic folder? I got this: Code: FOR /D %%p IN ("C:\USERS\%USERNAME%\Downloads\*.*") DO rmdir "%%p" /s /q cd C:\USERS\%USERNAME%\Downloads\ del *.* /q /s timeout /t 5...