Skip to content

Commit

Permalink
Test 2023 08 02 (#950)
Browse files Browse the repository at this point in the history
* Fix Restore Points before tweaks

* Compile Winutil

* Update Set-WinUtilRestorePoint.ps1

* Compile Winutil

* add snappy driver installer origin (#936)

* fix when User name have space (#937)

* Compile Winutil

* Add Applications (Fixed) (#944)

* Add Applications (Fixed)

This fixes #940 by removing OperaGX, fixing alphabetization, and removing my instance of Neovim which I didn't notice was added recently.

* Update winutil.ps1

* Update inputXML.xaml

---------

Co-authored-by: Chris Titus <[email protected]>

* Compile Winutil

* removing service stops in services tweak

* Fix pin not working for microsoft accounts

* Compile Winutil

* Remove verbose code

* Compile Winutil

---------

Co-authored-by: ChrisTitusTech <[email protected]>
Co-authored-by: Padsala Tushal <[email protected]>
Co-authored-by: AdamJedl <[email protected]>
Co-authored-by: AshlynOrSomethin <[email protected]>
  • Loading branch information
5 people authored Aug 8, 2023
1 parent 2321c07 commit cfb04b5
Show file tree
Hide file tree
Showing 8 changed files with 130 additions and 50 deletions.
20 changes: 20 additions & 0 deletions config/applications.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@
"winget": "GOG.Galaxy",
"choco": "goggalaxy"
},
"WPFInstallheroiclauncher": {
"winget": "HeroicGamesLauncher.HeroicGamesLauncher",
"choco": "na"
},
"WPFInstallgpuz": {
"winget": "TechPowerUp.GPU-Z",
"choco": "gpu-z"
Expand Down Expand Up @@ -155,6 +159,10 @@
"winget": "EclipseAdoptium.Temurin.11.JRE",
"choco": "javaruntime"
},
"WPFInstalljava20": {
"winget": "Azul.Zulu.20.JDK",
"choco": "na"
},
"WPFInstalljetbrains": {
"winget": "JetBrains.Toolbox",
"choco": "jetbrainstoolbox"
Expand All @@ -175,6 +183,10 @@
"winget": "Element.Element",
"choco": "element-desktop"
},
"WPFInstallmonitorian": {
"winget": "emoacht.Monitorian",
"choco": "monitorian"
},
"WPFInstallmpc": {
"winget": "clsid2.mpc-hc",
"choco": "mpc-hc"
Expand Down Expand Up @@ -327,6 +339,10 @@
"winget": "Nilesoft.Shell",
"choco": "na"
},
"WPFInstallsdio": {
"winget": "GlennDelahoy.SnappyDriverInstallerOrigin",
"choco": "na"
},
"WPFInstallklite": {
"winget": "CodecGuide.K-LiteCodecPack.Standard",
"choco": "k-litecodecpack-standard"
Expand Down Expand Up @@ -527,6 +543,10 @@
"winget": "RARLab.WinRAR",
"choco": "winrar"
},
"WPFInstallnano": {
"winget": "GNU.Nano",
"choco": "nano"
},
"WPFInstallneovim": {
"winget": "Neovim.Neovim",
"choco": "neovim"
Expand Down
3 changes: 0 additions & 3 deletions config/preset.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"WPFEssTweaksHome",
"WPFEssTweaksLoc",
"WPFEssTweaksOO",
"WPFEssTweaksRP",
"WPFEssTweaksServices",
"WPFEssTweaksStorage",
"WPFEssTweaksTele",
Expand All @@ -20,7 +19,6 @@
"WPFEssTweaksHome",
"WPFEssTweaksLoc",
"WPFEssTweaksOO",
"WPFEssTweaksRP",
"WPFEssTweaksServices",
"WPFEssTweaksStorage",
"WPFEssTweaksTele",
Expand All @@ -31,7 +29,6 @@
"minimal": [
"WPFEssTweaksHome",
"WPFEssTweaksOO",
"WPFEssTweaksRP",
"WPFEssTweaksServices",
"WPFEssTweaksTele"
]
Expand Down
16 changes: 5 additions & 11 deletions config/tweaks.json
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,8 @@
},
{
"Name": "KeyIso",
"StartupType": "Manual",
"OriginalType": "Manual"
"StartupType": "Automatic",
"OriginalType": "Automatic"
},
{
"Name": "KtmRm",
Expand Down Expand Up @@ -1000,8 +1000,8 @@
},
{
"Name": "VaultSvc",
"StartupType": "Manual",
"OriginalType": "Manual"
"StartupType": "Automatic",
"OriginalType": "Automatic"
},
{
"Name": "W32Time",
Expand Down Expand Up @@ -2134,16 +2134,10 @@
"InvokeScript": [
"curl.exe -s \"https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/ooshutup10_winutil_settings.cfg\" -o $ENV:temp\\ooshutup10.cfg
curl.exe -s \"https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe\" -o $ENV:temp\\OOSU10.exe
Start-Process $ENV:temp\\OOSU10.exe -ArgumentList \"$ENV:temp\\ooshutup10.cfg /quiet\"
Start-Process $ENV:temp\\OOSU10.exe -ArgumentList \"\"\"$ENV:temp\\ooshutup10.cfg\"\" /quiet\"
"
]
},
"WPFEssTweaksRP": {
"InvokeScript": [
"Enable-ComputerRestore -Drive \"$env:SystemDrive\"
Checkpoint-Computer -Description \"RestorePoint1\" -RestorePointType \"MODIFY_SETTINGS\""
]
},
"WPFEssTweaksStorage": {
"InvokeScript": [
"Remove-Item -Path \"HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\StorageSense\\Parameters\\StoragePolicy\" -Recurse -ErrorAction SilentlyContinue"
Expand Down
32 changes: 32 additions & 0 deletions functions/private/Set-WinUtilRestorePoint.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
function Set-WinUtilRestorePoint {
<#
.DESCRIPTION
This function will make a Restore Point
#>

# Check if the user has administrative privileges
if (-Not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
Write-Host "Please run this script as an administrator."
return
}

# Check if System Restore is enabled for the main drive
try {
# Try getting restore points to check if System Restore is enabled
Enable-ComputerRestore -Drive "$env:SystemDrive"
} catch {
Write-Host "An error occurred while enabling System Restore: $_"
}

# Get all the restore points for the current day
$existingRestorePoints = Get-ComputerRestorePoint | Where-Object { $_.CreationTime.Date -eq (Get-Date).Date }

# Check if there is already a restore point created today
if ($existingRestorePoints.Count -eq 0) {
$description = "System Restore Point created by WinUtil"

Checkpoint-Computer -Description $description -RestorePointType "MODIFY_SETTINGS"
}
}
9 changes: 0 additions & 9 deletions functions/private/Set-WinUtilService.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,6 @@ Function Set-WinUtilService {

# Service exists, proceed with changing properties
$service | Set-Service -StartupType $StartupType -ErrorAction Stop

if ($StartupType -eq "Disabled") {
Write-Host "Stopping $Name"
Stop-Service -Name $Name -Force -ErrorAction Stop
}
elseif ($StartupType -eq "Manual") {
Write-Host "Stopping $Name"
Stop-Service -Name $Name -Force -ErrorAction Stop
}
}
catch [System.ServiceProcess.ServiceNotFoundException] {
Write-Warning "Service $Name was not found"
Expand Down
2 changes: 2 additions & 0 deletions functions/public/Invoke-WPFtweaksbutton.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ function Invoke-WPFtweaksbutton {
return
}

Set-WinUtilRestorePoint

Invoke-WPFRunspace -ArgumentList $Tweaks -ScriptBlock {
param($Tweaks)

Expand Down
Loading

0 comments on commit cfb04b5

Please sign in to comment.