Skip to content

Commit

Permalink
Merge branch 'test-2024-04-20-2' into CW-MicroWin-240420
Browse files Browse the repository at this point in the history
  • Loading branch information
CodingWonders authored May 2, 2024
2 parents 7d46e63 + 11b6462 commit 0a44732
Show file tree
Hide file tree
Showing 7 changed files with 317 additions and 133 deletions.
48 changes: 24 additions & 24 deletions config/applications.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,6 @@
"link": "https://www.audacityteam.org/",
"winget": "Audacity.Audacity"
},
"WPFInstallauthy": {
"category": "Utilities",
"choco": "authy-desktop",
"content": "Authy",
"description": "Simple and cross-platform 2FA app",
"link": "https://authy.com/",
"winget": "Twilio.Authy"
},
"WPFInstallautoruns": {
"category": "Microsoft Tools",
"choco": "autoruns",
Expand Down Expand Up @@ -1231,6 +1223,14 @@
"link": "https://mremoteng.org/",
"winget": "mRemoteNG.mRemoteNG"
},
"WPFInstallmsedgeredirect": {
"category": "Utilities",
"choco": "msedgeredirect",
"content": "MSEdgeRedirect",
"description": "A Tool to Redirect News, Search, Widgets, Weather, and More to Your Default Browser.",
"link": "https://github.com/rcmaehl/MSEdgeRedirect",
"winget": "rcmaehl.MSEdgeRedirect"
},
"WPFInstallmsiafterburner": {
"category": "Utilities",
"choco": "msiafterburner",
Expand Down Expand Up @@ -1279,6 +1279,14 @@
"link": "https://github.com/M2Team/NanaZip",
"winget": "M2Team.NanaZip"
},
"WPFInstallnetbird": {
"category": "Pro Tools",
"choco": "netbird",
"content": "NetBird",
"description": "NetBird is a Open Source alternative comparable to TailScale that can be connected to a selfhosted Server.",
"link": "https://netbird.io/",
"winget": "netbird"
},
"WPFInstallnaps2": {
"category": "Document",
"choco": "naps2",
Expand Down Expand Up @@ -1895,14 +1903,6 @@
"link": "https://starship.rs/",
"winget": "starship"
},
"WPFInstallstartallback": {
"category": "Utilities",
"choco": "na",
"content": "StartAllBack",
"description": "StartAllBack is a Tool that can be used to edit the Windows appearance by your liking (Taskbar, Start Menu, File Explorer, Control Panel, Context Menu ...)",
"link": "https://www.startallback.com/",
"winget": "startallback"
},
"WPFInstallsteam": {
"category": "Games",
"choco": "steam-client",
Expand Down Expand Up @@ -2311,14 +2311,6 @@
"link": "https://wezfurlong.org/wezterm/index.html",
"winget": "wez.wezterm"
},
"WPFInstallwhatsapp": {
"category": "Communications",
"choco": "whatsapp",
"content": "Whatsapp",
"description": "WhatsApp Desktop is a desktop version of the popular messaging app, allowing users to send and receive messages, share files, and connect with contacts from their computer.",
"link": "https://www.whatsapp.com/",
"winget": "WhatsApp.WhatsApp"
},
"WPFInstallwindirstat": {
"category": "Utilities",
"choco": "windirstat",
Expand Down Expand Up @@ -2638,5 +2630,13 @@
"description": "Fast Node Manager (fnm) allows you to switch your Node version by using the Terminal",
"link": "https://github.com/Schniz/fnm",
"winget": "Schniz.fnm"
},
"WPFInstallWindhawk": {
"category": "Utilities",
"choco": "windhawk",
"content": "Windhawk",
"description": "The customization marketplace for Windows programs",
"link": "https://windhawk.net",
"winget": "RamenSoftware.Windhawk"
}
}
73 changes: 73 additions & 0 deletions config/tweaks.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,60 @@
}
]
},
"WPFTweaksAdobe": {
"Content": "Disable Adobe Services",
"Description": "Disables many of the services that come with Adobe and run in the background.",
"category": "Essential Tweaks",
"panel": "1",
"Order": "a009_",
"service": [
{
"Name": "AGSService",
"StartupType": "Manual",
"OriginalType": "Automatic"
},
{
"Name": "AdobeUpdateService",
"StartupType": "Manual",
"OriginalType": "Automatic"
},
{
"Name": "Adobe Acrobat Update",
"StartupType": "Manual",
"OriginalType": "Automatic"
},
{
"Name": "Adobe Genuine Monitor Service",
"StartupType": "Manual",
"OriginalType": "Automatic"
},
{
"Name": "AdobeARMservice",
"StartupType": "Manual",
"OriginalType": "Automatic"
},
{
"Name": "Adobe Licensing Console",
"StartupType": "Manual",
"OriginalType": "Automatic"
},
{
"Name": "CCXProcess",
"StartupType": "Manual",
"OriginalType": "Automatic"
},
{
"Name": "AdobeIPCBroker",
"StartupType": "Manual",
"OriginalType": "Automatic"
},
{
"Name": "CoreSync",
"StartupType": "Manual",
"OriginalType": "Automatic"
}
]
},
"WPFTweaksLoc": {
"Content": "Disable Location Tracking",
"Description": "Disables Location Tracking...DUH!",
Expand Down Expand Up @@ -2323,6 +2377,25 @@
"
]
},
"WPFTweaksRemoveCopilot": {
"Content": "Disables Microsoft Copilot",
"Description": "Disables MS Copilot AI built into Windows since 23H2.",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a025_",
"InvokeScript": [
"
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" -Name \"ShowCopilotButton\" -Type \"DWord\" -Value \"0\"
New-Item \"HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsCopilot\" -Force | New-ItemProperty -Name \"TurnOffWindowsCopilot\" -Value \"1\" -Force -Type \"DWord\"
"
],
"UndoScript": [
"
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" -Name \"ShowCopilotButton\" -Type \"DWord\" -Value \"1\"
Remove-Item \"HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsCopilot\" -Force
"
]
},
"WPFTweaksRemoveOnedrive": {
"Content": "Remove OneDrive",
"Description": "Copies OneDrive files to Default Home Folders and Uninstalls it.",
Expand Down
21 changes: 15 additions & 6 deletions functions/private/Test-WinUtilPackageManager.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,22 @@ function Test-WinUtilPackageManager {
$status = "not-installed"

if ($winget) {
# Install Winget if not detected
$wingetExists = Get-Command -Name winget -ErrorAction SilentlyContinue

if ($wingetExists) {
# Check Winget Version
$wingetVersionFull = (winget --version) # Full Version without 'v'.
# Check if Winget is available while getting it's Version if it's available
$wingetExists = $true
try {
$wingetVersionFull = winget --version
} catch [System.Management.Automation.CommandNotFoundException], [System.Management.Automation.ApplicationFailedException] {
Write-Warning "Winget was not found due to un-availablity reasons"
$wingetExists = $false
} catch {
Write-Warning "Winget was not found due to un-known reasons, The Stack Trace is:`n$($psitem.Exception.StackTrace)"
$wingetExists = $false
}

# If Winget is available, Parse it's Version and give proper information to Terminal Output.
# If it isn't available, the return of this funtion will be "not-installed", indicating that
# Winget isn't installed/available on The System.
if ($wingetExists) {
# Check if Preview Version
if ($wingetVersionFull.Contains("-preview")) {
$wingetVersion = $wingetVersionFull.Trim("-preview")
Expand Down
38 changes: 23 additions & 15 deletions functions/public/Invoke-WPFShortcut.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,35 @@ function Invoke-WPFShortcut {
[bool]$RunAsAdmin = $false
)

$iconPath = $null
Switch ($ShortcutToAdd) {
"WinUtil" {
$SourceExe = "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell.exe"
$IRM = 'irm https://christitus.com/win | iex'
$Powershell = '-ExecutionPolicy Bypass -Command "Start-Process powershell.exe -verb runas -ArgumentList'
$ArgumentsToSourceExe = "$powershell '$IRM'"
$DestinationName = "WinUtil.lnk"

if (Test-Path -Path "$env:TEMP\cttlogo.png") {
$iconPath = "$env:SystempRoot\cttlogo.ico"
ConvertTo-Icon -bitmapPath "$env:TEMP\cttlogo.png" -iconPath $iconPath
}
# Preper the Shortcut Fields and add an a Custom Icon if it's available at "$env:TEMP\cttlogo.png", else don't add a Custom Icon.
$iconPath = $null
Switch ($ShortcutToAdd) {
"WinUtil" {
$SourceExe = "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell.exe"
$IRM = 'irm https://christitus.com/win | iex'
$Powershell = '-ExecutionPolicy Bypass -Command "Start-Process powershell.exe -verb runas -ArgumentList'
$ArgumentsToSourceExe = "$powershell '$IRM'"
$DestinationName = "WinUtil.lnk"

if (Test-Path -Path "$env:TEMP\cttlogo.png") {
$iconPath = "$env:SystempRoot\cttlogo.ico"
ConvertTo-Icon -bitmapPath "$env:TEMP\cttlogo.png" -iconPath $iconPath
}
}
}

# Show a File Dialog Browser, to let the User choose the Name and Location of where to save the Shortcut
$FileBrowser = New-Object System.Windows.Forms.SaveFileDialog
$FileBrowser.InitialDirectory = [Environment]::GetFolderPath('Desktop')
$FileBrowser.Filter = "Shortcut Files (*.lnk)|*.lnk"
$FileBrowser.FileName = $DestinationName
$FileBrowser.ShowDialog() | Out-Null

# Do an Early Return if The Save Shortcut operation was cancel by User's Input.
$FileBrowserResult = $FileBrowser.ShowDialog()
$DialogResultEnum = New-Object System.Windows.Forms.DialogResult
if (-not ($FileBrowserResult -eq $DialogResultEnum::OK)) {
return
}

$WshShell = New-Object -comObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut($FileBrowser.FileName)
Expand All @@ -56,4 +64,4 @@ function Invoke-WPFShortcut {
}

Write-Host "Shortcut for $ShortcutToAdd has been saved to $($FileBrowser.FileName) with 'Run as administrator' set to $RunAsAdmin"
}
}
Loading

0 comments on commit 0a44732

Please sign in to comment.