Update windows packages and scripts
This commit is contained in:
parent
54367b557a
commit
ecae8fad68
8 changed files with 25 additions and 8 deletions
|
@ -6,5 +6,5 @@ screentogif
|
||||||
notepadplusplus
|
notepadplusplus
|
||||||
pinta
|
pinta
|
||||||
gimp
|
gimp
|
||||||
bulkrenameutility.install
|
bulkrenameutility
|
||||||
utc
|
utc
|
||||||
|
|
6
groups/win/work
Normal file
6
groups/win/work
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
win/tweaker
|
||||||
|
win/office
|
||||||
|
dev/tools
|
||||||
|
forensics
|
||||||
|
etcher
|
||||||
|
passwords
|
|
@ -1,2 +1,2 @@
|
||||||
powershell.ps1
|
chocolatey
|
||||||
registry.reg
|
powershell.ps1
|
|
@ -1,2 +1,6 @@
|
||||||
#!/bin/sh
|
#!/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
6
i.ps1
Normal 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
|
|
@ -6,19 +6,18 @@ if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:
|
||||||
[Security.Principal.WindowsBuiltInRole] 'Administrator')
|
[Security.Principal.WindowsBuiltInRole] 'Administrator')
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Write-Host "Not elevated, restarting..."
|
Write-Host "Not elevated, relaunching $($MyInvocation.MyCommand.Path)..."
|
||||||
$Loc = Get-Location
|
$Loc = Get-Location
|
||||||
|
|
||||||
$Arguments = @(
|
$Arguments = @(
|
||||||
'-NoProfile',
|
'-NoProfile',
|
||||||
'-ExecutionPolicy Bypass',
|
'-ExecutionPolicy Bypass',
|
||||||
'-NoExit',
|
|
||||||
'-File',
|
'-File',
|
||||||
"`"$($MyInvocation.MyCommand.Path)`"",
|
"`"$($MyInvocation.MyCommand.Path)`"",
|
||||||
"\`"$Loc\`""
|
"\`"$Loc\`""
|
||||||
)
|
)
|
||||||
Start-Process -FilePath PowerShell.exe -Verb RunAs -ArgumentList $Arguments
|
Start-Process -Wait -FilePath PowerShell.exe -Verb RunAs -ArgumentList $Arguments
|
||||||
Break
|
Return
|
||||||
}
|
}
|
||||||
if($Loc.Length -gt 1){
|
if($Loc.Length -gt 1){
|
||||||
Set-Location $Loc.Substring(1,$Loc.Length-2)
|
Set-Location $Loc.Substring(1,$Loc.Length-2)
|
||||||
|
|
0
packages/files/chocolatey
Normal file
0
packages/files/chocolatey
Normal file
2
packages/utc/powershell.ps1
Normal file
2
packages/utc/powershell.ps1
Normal 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'"
|
Loading…
Add table
Reference in a new issue