Giter VIP home page Giter VIP logo

Comments (5)

dhoer avatar dhoer commented on July 25, 2024

You could also run preset, custom and alacarte. They would run in that order or precedence.

from win10-initial-setup-script.

dhoer avatar dhoer commented on July 25, 2024

I wrapped this in a choco package: https://github.com/dhoer/choco-win10-initial-setup-script

Feel free to use it. Thanks for this awesome script! I was struggling to find figure out how to disable windows functions.

from win10-initial-setup-script.

Disassembler0 avatar Disassembler0 commented on July 25, 2024

OK, I gotta plead ignorance here. I'm aware that chocolatey is some package manager for people who are too sexy to search for silent installation switches themselves. I have never used it and I'm not planning to. What's the benefit of having this script in such repository if the simplest 'get & run' can be achieved with this?

Invoke-WebRequest https://raw.githubusercontent.com/Disassembler0/Win10-Initial-Setup-Script/master/Win10.ps1
powershell.exe -NoProfile -ExecutionPolicy Bypass -File Win10.ps1 <your options here>

The aim of the script is to adjust the system once, immediately after the installation. And in worst case re-adjust it after some major OS update. If I understand the concept of chocolatey correctly, it would mean that the script would get re-applied with every release, resp. whenever there is a new release and the user launches upgrade. That would also mean that the user has to re-adjust the preset with every upgrade as they might not be compatible between the versions.

Don't get me wrong, I'm not against the idea (actually I am, but only if it gets complicated). I'm just not sure if it's worth the hassle. What would be the minimum viable code to get chocolatey working without changing anything in the original script? Would this work?

$pdir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$pp   = Get-PackageParameters

if ($pp["custom"] -ne $null -and $pp["custom"] -ne '') {
    Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$pdir\Win10.ps1`" $($pp['custom'])" -WorkingDirectory $pwd -Verb RunAs
}

And launch with original syntax like this?

choco install win10setup --params "/Custom:EnableFirewall EnableDefender" --force
choco install win10setup --params "/Custom:-preset mypreset.txt" --force

Btw. looking at your repo... it's not a good idea to use the ApplyAll and RestoreAll presets. Those should be used just for testing.

from win10-initial-setup-script.

dhoer avatar dhoer commented on July 25, 2024

What's the benefit of having this script in such repository if the simplest 'get & run' can be achieved with this?

I agree somewhat. But it is nice to have a consistent way to manage installs for many customer that all have different needs. If chocolatey would implement this: chocolatey/choco#1390. Then the advantage would be automatic cache of download url. Which would mean that I would never have to worry if I'm cutting a new windows AMIs and github or whatever is down.

What would be the minimum viable code to get chocolatey working without changing anything in the original script? Would this work? And launch with original syntax like this?

I don't think it would handle the spaces. And I had issues with choco running the script directly as well, so I pulled out the functions, then sourced the functions, and run iex within choco. Maybe if there were a way to pull out the tweak section and functions after choco downloads, that would work. But would we would have to agree on begin and end comments not changing for both tweaks and function sections so I can pull those out to their own files during choco install.

So tweaks would pull everything between # Default preset and # Privacy Settings, and functions would pull everything between # Privacy Settings and # Parse parameters and apply tweaks.

Btw. looking at your repo... it's not a good idea to use the ApplyAll and RestoreAll presets. Those should be used just for testing.

Good to know.

I also like the idea of being able to run /preset /customer and zero or many / tags altogether. Precedence would be that order as well. So if preset was set, it would always run first, custom - if set- second, and last. But I can't guarantee the order will run, but it shouldn't matter.

from win10-initial-setup-script.

dhoer avatar dhoer commented on July 25, 2024

I'm going to go ahead and close this.

from win10-initial-setup-script.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.