Install chocolatey profile for all future users

This commit is contained in:
Manuel Thalmann 2023-07-19 14:33:06 +02:00
parent b65f144d45
commit fa035a29b2
4 changed files with 17 additions and 8 deletions

View file

@ -33,8 +33,6 @@ function Restore-PersonalApps([Context] $context) {
Install-PersonalDrivers $context;
}
. "$PSScriptRoot/../Software/chocolatey/Install.ps1";
# Backed up applications
Restore-Git $context;
Restore-LogitechGHUB $context;

View file

@ -0,0 +1,16 @@
#!/bin/pwsh
powershell -c 'New-Item -Force $PROFILE';
choco install --force chocolatey;
Copy-Item -Force (powershell -c '$PROFILE') $PROFILE;
Push-Location ~;
$files = @((powershell -c '$PROFILE'), $PROFILE) | ForEach-Object { Resolve-Path -Relative $_ };
foreach ($profileFile in $files) {
Copy-Item -Force "~/$profileFile" "C:/Users/Default/$profileFile";
}
Pop-Location;
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1";

View file

@ -15,6 +15,7 @@ function Invoke-WindowsInstallation([Context] $context)
. "$configPath/Windows/Install.ps1" $context;
. "$configPath/Explorer/Install.ps1" $context;
. "$configPath/OpenSSH/Install.ps1" $context;
. "$configPath/chocolatey/Install.ps1";
$context.RemoveDesktopIcon("*Microsoft Edge*");
$context.Set("InitialConfiguration", 1, "DWord");

View file

@ -1,6 +0,0 @@
#!/bin/pwsh
powershell -c 'New-Item -Force $PROFILE';
choco install --force chocolatey;
Copy-Item -Force (powershell -c '$PROFILE') $PROFILE;
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1";