Update windows packages and scripts

This commit is contained in:
xeruf 2022-09-08 19:25:02 +02:00
parent 54367b557a
commit ecae8fad68
8 changed files with 25 additions and 8 deletions

View File

@ -6,5 +6,5 @@ screentogif
notepadplusplus
pinta
gimp
bulkrenameutility.install
bulkrenameutility
utc

6
groups/win/work Normal file
View File

@ -0,0 +1,6 @@
win/tweaker
win/office
dev/tools
forensics
etcher
passwords

View File

@ -1,2 +1,2 @@
powershell.ps1
registry.reg
chocolatey
powershell.ps1

View File

@ -1,2 +1,6 @@
#!/bin/sh
powershell -Command "Start-Process 'choco' -Verb runAs -ArgumentList 'install $*'"
# https://stackoverflow.com/questions/43650595/is-there-a-command-to-check-if-git-bash-is-opened-in-administrator-mode/58846650#58846650
if [[ $(sfc 2>&1 | tr -d '\0') =~ SCANNOW ]]
then choco install "$@"
else exec powershell -Command "Start-Process 'choco' -Verb runAs -ArgumentList 'install $*'"
fi

6
i.ps1 Normal file
View File

@ -0,0 +1,6 @@
# manual execution: Set-ExecutionPolicy Bypass -Scope Process -Force; .\i
(Test-Path "$PWD\instalee") -and (cd instalee)
packages\chocolatey\powershell.ps1
Start-Process -Wait choco -Verb runAs -ArgumentList 'install git'
Start-Process -Wait "C:\Program Files\Git\git-bash.exe" -Verb runAs -ArgumentList "-c './instalee win/office; sleep 10 || bash'"
Sleep 10

View File

@ -6,19 +6,18 @@ if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:
[Security.Principal.WindowsBuiltInRole] 'Administrator')
)
{
Write-Host "Not elevated, restarting..."
Write-Host "Not elevated, relaunching $($MyInvocation.MyCommand.Path)..."
$Loc = Get-Location
$Arguments = @(
'-NoProfile',
'-ExecutionPolicy Bypass',
'-NoExit',
'-File',
"`"$($MyInvocation.MyCommand.Path)`"",
"\`"$Loc\`""
)
Start-Process -FilePath PowerShell.exe -Verb RunAs -ArgumentList $Arguments
Break
Start-Process -Wait -FilePath PowerShell.exe -Verb RunAs -ArgumentList $Arguments
Return
}
if($Loc.Length -gt 1){
Set-Location $Loc.Substring(1,$Loc.Length-2)

View File

View File

@ -0,0 +1,2 @@
powershell -Command "Start-Process 'reg' -Verb runAs -ArgumentList 'add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation /v RealTimeIsUniversal /d 1 /f'"