Skip to content

Commit

Permalink
Revamped Git And Keys Setup
Browse files Browse the repository at this point in the history
- Config Git User properly
- Config SSH keys properly
- Config GnuPG keys properly
- Try to uninstall Microsoft Teams UWP with a wildcard, while i still without Win 11
- Added a Switch on Install Software to not display Dialog after installing a package
- Delete unused comments on get-os-info
  • Loading branch information
LeDragoX committed Apr 2, 2022
1 parent ad9f0c4 commit efe1a5d
Show file tree
Hide file tree
Showing 7 changed files with 254 additions and 256 deletions.
12 changes: 6 additions & 6 deletions Win10ScriptGUI.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@ function Show-GUI() {
$WindowsTerminalNerdFonts = New-Button -Text "Windows Terminal + Nerd Font" -Width $ButtonWidth -Height $ButtonHeight -LocationX $ButtonX -LocationY $NextYLocation -FontSize $FontSize1

$NextYLocation = $WindowsTerminalNerdFonts.Location.Y + $WindowsTerminalNerdFonts.Height + $DistanceBetweenButtons
$GitAndKeysSetup = New-Button -Text "Git and Keys Setup" -Width $ButtonWidth -Height $ButtonHeight -LocationX $ButtonX -LocationY $NextYLocation -FontSize $FontSize1
$GitGnupgSshSetup = New-Button -Text "Git + GnuPG + SSH (Setup)" -Width $ButtonWidth -Height $ButtonHeight -LocationX $ButtonX -LocationY $NextYLocation -FontSize $FontSize1

$NextYLocation = $GitAndKeysSetup.Location.Y + $GitAndKeysSetup.Height + $DistanceBetweenButtons
$NextYLocation = $GitGnupgSshSetup.Location.Y + $GitGnupgSshSetup.Height + $DistanceBetweenButtons
$JavaJRE = New-Button -Text "Java JRE" -Width $ButtonWidth -Height $ButtonHeight -LocationX $ButtonX -LocationY $NextYLocation -FontSize $FontSize1

$NextYLocation = $JavaJRE.Location.Y + $JavaJRE.Height + $DistanceBetweenButtons
Expand Down Expand Up @@ -494,7 +494,7 @@ function Show-GUI() {
$Panel3.Controls.AddRange(@($CaptionLabel3_8, $RadminVPN, $Hamachi))
$Panel3.Controls.AddRange(@($CaptionLabel3_9, $TwilioAuthy))
$Panel3.Controls.AddRange(@($CaptionLabel3_10, $Ventoy, $Rufus, $BalenaEtcher))
$Panel3.Controls.AddRange(@($CaptionLabel3_11, $WindowsTerminalNerdFonts, $GitAndKeysSetup, $JavaJRE, $JavaJDKs, $NodeJsLts, $NodeJs, $Python3, $Anaconda3, $Ruby, $ADB, $AndroidStudio, $DockerDesktop, $PostgreSQL, $MySQL, $Insomnia))
$Panel3.Controls.AddRange(@($CaptionLabel3_11, $WindowsTerminalNerdFonts, $GitGnupgSshSetup, $JavaJRE, $JavaJDKs, $NodeJsLts, $NodeJs, $Python3, $Anaconda3, $Ruby, $ADB, $AndroidStudio, $DockerDesktop, $PostgreSQL, $MySQL, $Insomnia))

$Panel4.Controls.AddRange(@($InstallGamingDependencies, $CaptionLabel4_1, $Discord, $MSTeams, $Slack, $Zoom, $Telegram, $RocketChat))
$Panel4.Controls.AddRange(@($CaptionLabel4_2, $Steam, $GogGalaxy, $EpicGames, $EADesktop, $UbisoftConnect, $BorderlessGaming))
Expand Down Expand Up @@ -737,7 +737,7 @@ function Show-GUI() {
})

$Rufus.Add_Click( {
Install-Software -Name $Rufus.Text -PackageName "Rufus" -InstallBlock { choco install -y $Package }
Install-Software -Name $Rufus.Text -PackageName "9PC3H3V7Q9CH" -InstallBlock { winget install --source "msstore" --id $Package --accept-package-agreements }
})

$BalenaEtcher.Add_Click( {
Expand All @@ -756,8 +756,8 @@ function Show-GUI() {
Install-Software -Name $WindowsTerminalNerdFonts.Text -PackageName "Microsoft.WindowsTerminal"
})

$GitAndKeysSetup.Add_Click( {
$Scripts = @("setup-git-keys-and-sign.ps1")
$GitGnupgSshSetup.Add_Click( {
$Scripts = @("git-gnupg-ssh-keys-setup.ps1")
Open-PowerShellFilesCollection -RelativeLocation "src\utils" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
})

Expand Down
3 changes: 1 addition & 2 deletions src/lib/get-os-info.psm1
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
function Get-CPU() {
# Adapted from: https://community.spiceworks.com/how_to/170332-how-to-get-cpu-information-in-windows-powershell
[CmdletBinding()] param () #$CPU = (Get-WmiObject -Class Win32_Processor -ComputerName. | Select-Object -Property [a-z]*) # Non-performative
[CmdletBinding()] param ()

$CPUName = (Get-ItemProperty "HKLM:\HARDWARE\DESCRIPTION\System\CentralProcessor\0").ProcessorNameString.Trim(" ")
$CPUCoresAndThreads = "($((Get-WmiObject -class Win32_processor).NumberOfCores)C/$env:NUMBER_OF_PROCESSORS`rT)"
Expand Down
10 changes: 7 additions & 3 deletions src/lib/install-software.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ function Install-Software() {
param (
[String] $Name,
[Array] $PackageName,
[ScriptBlock] $InstallBlock = { winget install --silent --source "winget" --id $Package }
[ScriptBlock] $InstallBlock = { winget install --silent --source "winget" --id $Package },
[Parameter(Mandatory = $false)]
[Switch] $NoDialog
)

$DoneTitle = "Done"
Expand All @@ -16,11 +18,13 @@ function Install-Software() {
}
Else {
ForEach ($Package in $PackageName) {
Invoke-Expression "$InstallBlock" | Out-Host
#Invoke-Expression "$InstallBlock" | Out-Host
}
}

Show-Message -Title "$DoneTitle" -Message "$DoneMessage"
If (!($NoDialog)) {
Show-Message -Title "$DoneTitle" -Message "$DoneMessage"
}
}

<#
Expand Down
6 changes: 3 additions & 3 deletions src/lib/original/New-FolderForced.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ function New-FolderForced {
$Path
)

process {
if (-not (Test-Path $Path)) {
Write-Verbose "-- Creating full path to: $Path"
Process {
If (-not (Test-Path $Path)) {
Write-Verbose "-- Creating full path to: $Path"
New-Item -Path $Path -ItemType Directory -Force
}
}
Expand Down
76 changes: 38 additions & 38 deletions src/scripts/remove-bloatware-apps.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ function Remove-BloatwareAppsList() {

$Apps = @(
# Default Windows 10+ apps
"Microsoft.3DBuilder" # 3D Builder
"Microsoft.3DBuilder" # 3D Builder
"Microsoft.Appconnector"
"Microsoft.BingFinance" # Finance
"Microsoft.BingFoodAndDrink" # Food And Drink
"Microsoft.BingHealthAndFitness" # Health And Fitness
"Microsoft.BingNews" # News
"Microsoft.BingSports" # Sports
"Microsoft.BingTranslator" # Translator
"Microsoft.BingTravel" # Travel
"Microsoft.BingWeather" # Weather
"Microsoft.BingFinance" # Finance
"Microsoft.BingFoodAndDrink" # Food And Drink
"Microsoft.BingHealthAndFitness" # Health And Fitness
"Microsoft.BingNews" # News
"Microsoft.BingSports" # Sports
"Microsoft.BingTranslator" # Translator
"Microsoft.BingTravel" # Travel
"Microsoft.BingWeather" # Weather
"Microsoft.CommsPhone"
"Microsoft.ConnectivityStore"
"Microsoft.GamingServices"
Expand All @@ -25,58 +25,58 @@ function Remove-BloatwareAppsList() {
"Microsoft.Microsoft3DViewer"
"Microsoft.MicrosoftOfficeHub"
"Microsoft.MicrosoftPowerBIForWindows"
"Microsoft.MicrosoftSolitaireCollection"# MS Solitaire
"Microsoft.MicrosoftSolitaireCollection" # MS Solitaire
"Microsoft.MixedReality.Portal"
"Microsoft.NetworkSpeedTest"
"Microsoft.Office.OneNote" # MS Office One Note
"Microsoft.Office.OneNote" # MS Office One Note
"Microsoft.Office.Sway"
"Microsoft.OneConnect"
"Microsoft.People" # People
"Microsoft.MSPaint" # Paint 3D (Where every artist truly start as a kid, i mean, on original Paint, not this 3D)
"Microsoft.Print3D" # Print 3D
"Microsoft.SkypeApp" # Skype (Who still uses Skype? Use Discord)
"Microsoft.Todos" # Microsoft To Do
"Microsoft.People" # People
"Microsoft.MSPaint" # Paint 3D (Where every artist truly start as a kid, i mean, on original Paint, not this 3D)
"Microsoft.Print3D" # Print 3D
"Microsoft.SkypeApp" # Skype (Who still uses Skype? Use Discord)
"Microsoft.Todos" # Microsoft To Do
"Microsoft.Wallet"
"Microsoft.Whiteboard" # Microsoft Whiteboard
"Microsoft.WindowsAlarms" # Alarms
"Microsoft.Whiteboard" # Microsoft Whiteboard
"Microsoft.WindowsAlarms" # Alarms
"microsoft.windowscommunicationsapps"
"Microsoft.WindowsMaps" # Maps
"Microsoft.WindowsMaps" # Maps
"Microsoft.WindowsPhone"
"Microsoft.WindowsReadingList"
"Microsoft.WindowsSoundRecorder"
"Microsoft.XboxApp" # Xbox Console Companion (Replaced by new App)
"Microsoft.XboxApp" # Xbox Console Companion (Replaced by new App)
"Microsoft.XboxGameCallableUI"
"Microsoft.XboxGameOverlay"
"Microsoft.XboxSpeechToTextOverlay"
"Microsoft.YourPhone" # Your Phone
"Microsoft.ZuneMusic"
"Microsoft.ZuneVideo" # Movies & TV
"Microsoft.YourPhone" # Your Phone
"Microsoft.ZuneMusic" # Groove Music /
"Microsoft.ZuneVideo" # Movies & TV

# Default Windows 11 apps
"MicrosoftWindows.Client.WebExperience" # Taskbar Widgets
"MicrosoftTeams" # Microsoft Teams / Preview
"MicrosoftWindows.Client.WebExperience" # Taskbar Widgets
"*MicrosoftTeams*" # Microsoft Teams / Preview

# 3rd party Apps
"*ACGMediaPlayer*"
"*ActiproSoftwareLLC*"
"*AdobePhotoshopExpress*" # Adobe Photoshop Express
"*Amazon.com.Amazon*" # Amazon Shop
"*Asphalt8Airborne*" # Asphalt 8 Airbone
"*AdobePhotoshopExpress*" # Adobe Photoshop Express
"*Amazon.com.Amazon*" # Amazon Shop
"*Asphalt8Airborne*" # Asphalt 8 Airbone
"*AutodeskSketchBook*"
"*BubbleWitch3Saga*" # Bubble Witch 3 Saga
"*BubbleWitch3Saga*" # Bubble Witch 3 Saga
"*CaesarsSlotsFreeCasino*"
"*CandyCrush*" # Candy Crush
"*CandyCrush*" # Candy Crush
"*COOKINGFEVER*"
"*CyberLinkMediaSuiteEssentials*"
"*DisneyMagicKingdoms*"
"*Dolby*" # Dolby Products (Like Atmos)
"*Dolby*" # Dolby Products (Like Atmos)
"*DrawboardPDF*"
"*Duolingo-LearnLanguagesforFree*" # Duolingo
"*Duolingo-LearnLanguagesforFree*" # Duolingo
"*EclipseManager*"
"*Facebook*" # Facebook
"*Facebook*" # Facebook
"*FarmVille2CountryEscape*"
"*FitbitCoach*"
"*Flipboard*" # Flipboard
"*Flipboard*" # Flipboard
"*HiddenCity*"
"*Hulu*"
"*iHeartRadio*"
Expand All @@ -88,16 +88,16 @@ function Remove-BloatwareAppsList() {
"*PandoraMediaInc*"
"*PhototasticCollage*"
"*PicsArt-PhotoStudio*"
"*Plex*" # Plex
"*Plex*" # Plex
"*PolarrPhotoEditorAcademicEdition*"
"*RoyalRevolt*" # Royal Revolt
"*RoyalRevolt*" # Royal Revolt
"*Shazam*"
"*Sidia.LiveWallpaper*" # Live Wallpaper
"*Sidia.LiveWallpaper*" # Live Wallpaper
"*SlingTV*"
"*Speed Test*"
"*Sway*"
"*TuneInRadio*"
"*Twitter*" # Twitter
"*Twitter*" # Twitter
"*Viber*"
"*WinZipUniversal*"
"*Wunderlist*"
Expand Down
Loading

0 comments on commit efe1a5d

Please sign in to comment.