From 032cdc7da2502a58fe49a1672f879b450103c743 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 8 Sep 2024 03:20:26 +0000 Subject: [PATCH] Update wingetSetup.ps1 --- wingetSetup.ps1 | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/wingetSetup.ps1 b/wingetSetup.ps1 index ce7b97e..439b544 100644 --- a/wingetSetup.ps1 +++ b/wingetSetup.ps1 @@ -1,4 +1,18 @@ +#winget install --id Git.Git -e --source winget +#Get-ExecutionPolicy +#Set-ExecutionPolicy RemoteSigned +#cd "$env:USERPROFILE\Downloads" ; git clone https://hmg.studio/HomeHosted/winget.git ; cd winget + + + +# Command 1: Install Git without admin privileges winget install --id Git.Git -e --source winget + +# Command 2: Get current execution policy without admin privileges Get-ExecutionPolicy -Set-ExecutionPolicy RemoteSigned -cd "$env:USERPROFILE\Downloads" ; git clone https://hmg.studio/HomeHosted/winget.git ; cd winget \ No newline at end of file + +# Command 3: Set execution policy to RemoteSigned with admin privileges +Start-Process powershell -ArgumentList "Set-ExecutionPolicy RemoteSigned -Scope CurrentUser" -Verb RunAs -Wait + +# Command 4: Change directory, clone repository, and change directory without admin privileges +cd "$env:USERPROFILE\Downloads" ; git clone https://hmg.studio/HomeHosted/winget.git ; cd winget