Run Windows 10 Setup Script after installation to customize the OS - gHacks Tech News

ADVERTISEMENT

Run Windows 10 Setup Script after installation to customize the OS

Windows 10 Setup Script is a PowerShell script designed to be run right on the first run after Windows 10 was installed and set up on a computer. The main idea behind the script is to give administrators ample options to customize the experience, e.g. by modifying privacy related settings, making other tweaks, or removing built-in applications.

Note: Windows 10 Setup Script is an advanced script that should not be run on Windows 10 installations that are not new. Additionally, since it can potentially change many settings and options on the system, it is advised to create a backup before you run the script.

Tip: check out our overview of privacy tools for Windows 10.

Windows 10 Setup Script

Using the script requires some preparation. First, it is important that you download the script for the target version of Windows 10 that you want to modify. The developer offers scripts for Windows 10 version 1903, 1909, 2004 and Windows 10 LTSC 1809. A test version for Windows 10 21H1 is in the works right now as well.

Once you have downloaded and extracted the right version, it is necessary to open the script in a text editor or PowerShell IDE as it needs to be configured before it should be run. While you can, in theory, run the script and use all of the defaults, it is better to go through the script to enable or disable the options to be in line with your expectations.

windows 10 setup script

Users who cannot read PowerShell scripts may still do that as documentation is provided in the form of comments. Still, it is best suited for advanced users who will feel more comfortable doing that. The Windows 10 version 2004 script has a total of 3488 lines and that takes some time to go through, even if you are an advanced user.

So, what modifications does the script support? Among others (the full list is here):

  • Set up Privacy & Telemetry
  • Turn off diagnostics tracking scheduled tasks
  • Set up UI & Personalization
  • Uninstall OneDrive "correctly"
  • Change %TEMP% environment variable path to %SystemDrive%\Temp
  • Change location of the user folders programmatically (without moving user files) within interactive menu using up/down arrows and Enter key to make a selection
  • Uninstall UWP apps from all accounts with exception apps list with pop-up form written in WPF
  • Turn off Windows features
  • Remove Windows capabilities with pop-up form written in WPF
  • Create a Windows cleaning up task in the Task Scheduler
  • Unpin all Start menu tiles
  • Pin shortcuts to Start menu using syspin.exe
  • Three shortcuts are preconfigured to be pinned: Control Panel, "old style" Devices and Printers, and Command Prompt
  • Turn on Controlled folder access and add protected folders using dialog menu
  • Add exclusion folder from Microsoft Defender Antivirus scanning using dialog menu
  • Add exclusion file from Microsoft Defender Antivirus scanning using dialog menu
  • Refresh desktop icons, environment variables and taskbar without restarting File Explorer

All you need to do is use comments # to enable or disable certain tweaks in the script. Just place these in the front of commands to skip them when the script is run. Save the script once you have modified it.

Now it is necessary to run it on the system. This requires that you set the execution policy to bypass as Windows 10 will refuse to run the script otherwise.

  1. Open an elevated PowerShell prompt, e.g. by displaying the "secret" menu with Windows-X and selecting the option.
  2. Run the command: Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force
  3. Run the PowerShell script or Start.cmd as administrator afterwards.

The program may display some choices to you, e.g. a list of apps to uninstall, depending on your editing of the script.

Closing Words

Windows 10 Setup Script is an advanced tool for advanced users and system administrators who want to modify new installations of Windows 10 right from the get-go. It takes quite a bit of preparing as you need to go through the script to make sure that everything is set up according to the needs before the script is run.

All in all, a great tool for advanced users who want to modify the system heavily.

Now You: do you use privacy tools?

Summary
software image
Author Rating
1star1star1star1star1star
4 based on 14 votes
Software Name
Windows 10 Setup Script
Operating System
Windows 10
Software Category
Administration
Landing Page
Advertisement

Previous Post: «
Next Post: »

Comments

  1. Pavel Moroz said on August 19, 2020 at 4:55 pm
    Reply

    I used this script about 5 times on different PC. All good

  2. VioletMoon said on August 19, 2020 at 5:26 pm
    Reply

    I ran a script last week for some simple tweaks to eliminate some simple problems and had excellent luck.

    Definitely not advanced enough nor do I have time enough to work with something this powerful–scary thought.

    What amazes me most is the intelligence factor behind the program–that someone knows that much about the Windows OS that a script can be created like that.

    Truly, sheer genius.

    Thanks for the tip.

    1. Peterc said on August 20, 2020 at 5:44 pm
      Reply

      @VioletMoon:

      “[S]omething this powerful–scary thought.”

      That was my initial reaction! But then, I never graduated from batch files to PowerShell scripts. Maybe going through the script in Notepad++ would make for an interesting introduction to how they work.

      [LATER:] I examined the script and it *did* make for an interesting introduction, although it was kind of a jump into the deep end. It looks to me like users who know what they are doing might be able to [carefully] pare down the script to cherrypick a subset of settings commands that would be okay to run on systems that have already been in use for a while — for example, after installing Microsoft updates, which sometimes undo custom privacy settings. But I’ll let the “users who know what they are doing” weigh in on that.

  3. Yuliya said on August 19, 2020 at 8:34 pm
    Reply

    GPEdit on LTSC is all I need ;)

    1. Peterc said on August 20, 2020 at 5:54 pm
      Reply

      @Yuliya: I think the idea is that if you are responsible for configuring multiple new Windows 10 installs in the same way, using a script is much faster, more consistent, and less prone to human errors and oversights. (Well … less prone to human errors and oversights *except* when it comes to configuring the script!)

  4. Anonymous said on August 19, 2020 at 10:20 pm
    Reply

    Run script to debloat Windows 10.

  5. KERR said on August 20, 2020 at 1:27 am
    Reply

    Awesome, i made my own win10 tweak script but it broke Defender badly. This one looks less ghetto!

  6. ULBoom said on August 20, 2020 at 2:19 am
    Reply

    Interesting.
    Worth going through and running appropriate items next install. Beats doing all this by hand with gpedit, tasks, services, settings, etc., using notes and memory.

  7. Sanctuary said on August 20, 2020 at 6:47 am
    Reply

    Hello. I’m the script author. If you have any bugs or issues feel free to create an issue on GitHub. :)
    Also there is a typo in article: to comment string PowerShell uses ” char instead of // as in batch.
    Thanks Martin for the artcile!

    1. Cornelis said on August 20, 2020 at 3:16 pm
      Reply

      Is it possible to disable Windows Update also with this script?

      1. Sanctuary said on August 20, 2020 at 8:32 pm
        Reply

        No. I do not provide and do not advice such thing.

  8. Anonymous said on August 20, 2020 at 8:59 pm
    Reply

    Crap, just use ShutUp10

    1. ULBoom said on August 22, 2020 at 1:12 am
      Reply

      If you don’t mind resetting some of it on each boot. ShutUp and Windows 10 Setup Script are different in intent and execution.

  9. k said on August 25, 2020 at 2:33 am
    Reply

    ran this script but it broke my twitch stream. dunno how to fix.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.