Compare commits
16 Commits
e7a798c937
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 4300cbfa53 | |||
| e22f17384b | |||
| 1d744181c0 | |||
| cb7bd116e3 | |||
| af4d813fd4 | |||
| 97a7e36cbd | |||
| 5ec540b655 | |||
| 9edf0897b6 | |||
| 615ba57532 | |||
| 3cc521e1c4 | |||
| 2f0dc84a56 | |||
| 5e047a1425 | |||
| a62c97be93 | |||
| 86ac65f758 | |||
| bb32504713 | |||
| 9ad206929b |
@ -1,5 +1,6 @@
|
|||||||
$source = "https://github.com/PowerShell/Win32-OpenSSH/releases/download/v8.9.1.0p1-Beta/OpenSSH-Win64.zip"
|
$source = "https://github.com/PowerShell/Win32-OpenSSH/releases/download/v8.9.1.0p1-Beta/OpenSSH-Win64.zip"
|
||||||
$source = "https://github.com/PowerShell/Win32-OpenSSH/releases/download/v9.2.2.0p1-Beta/OpenSSH-Win64.zip"
|
$source = "https://github.com/PowerShell/Win32-OpenSSH/releases/download/v9.2.2.0p1-Beta/OpenSSH-Win64.zip"
|
||||||
|
$source = "https://github.com/PowerShell/Win32-OpenSSH/releases/download/v9.8.3.0p2-Preview/OpenSSH-Win64.zip"
|
||||||
$destination = "C:\Packages\OpenSSH-Win64.zip"
|
$destination = "C:\Packages\OpenSSH-Win64.zip"
|
||||||
|
|
||||||
Invoke-WebRequest -Uri $source -OutFile $destination
|
Invoke-WebRequest -Uri $source -OutFile $destination
|
||||||
|
|||||||
@ -1,54 +1,51 @@
|
|||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
set check_computername=%COMPUTERNAME%
|
set check_computername=%COMPUTERNAME%
|
||||||
echo "Found computer %check_computername%"
|
echo "Found computer %check_computername%"
|
||||||
|
|
||||||
set PACKAGES="C:\Packages"
|
set PACKAGES="C:\Packages"
|
||||||
set WPUBLIC="C:\wPublic"
|
set WPUBLIC="C:\wPublic"
|
||||||
|
|
||||||
mkdir %PACKAGES%
|
set POWERSHELL=%SYSTEMROOT%\system32\WindowsPowerShell\v1.0\powershell.exe
|
||||||
|
|
||||||
call %WPUBLIC%\bin\SpeedUpPS.bat
|
mkdir %PACKAGES%
|
||||||
|
|
||||||
echo "------- attempting uninstall first"
|
echo "------- attempting uninstall first"
|
||||||
set PSFILE="C:\Program Files\OpenSSH\uninstall-sshd.ps1"
|
set PSFILE="C:\Program Files\OpenSSH\uninstall-sshd.ps1"
|
||||||
if exist %PSFILE% (
|
if exist %PSFILE% (
|
||||||
echo "SSH uninstall script"
|
echo "SSH uninstall script"
|
||||||
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE%
|
%POWERSHELL% -ExecutionPolicy Bypass -File %PSFILE%
|
||||||
)
|
)
|
||||||
|
|
||||||
del /f/s/q "C:\Program Files\OpenSSH\*.*"
|
del /f/s/q "C:\Program Files\OpenSSH\*.*"
|
||||||
rmdir /s/q "C:\Program Files\OpenSSH"
|
rmdir /s/q "C:\Program Files\OpenSSH"
|
||||||
|
|
||||||
del /f/s/q "C:\Packages\openssh-portable-9.2.2.0\*.*"
|
|
||||||
rmdir /s/q "C:\Packages\openssh-portable-9.2.2.0"
|
|
||||||
|
|
||||||
del /f/s/q "C:\Packages\OpenSSH-Win64\*.*"
|
del /f/s/q "C:\Packages\OpenSSH-Win64\*.*"
|
||||||
rmdir /s/q "C:\Packages\OpenSSH-Win64"
|
rmdir /s/q "C:\Packages\OpenSSH-Win64"
|
||||||
|
|
||||||
echo "------- Download and unpack OpenSSH"
|
echo "------- Download and unpack OpenSSH"
|
||||||
set PSFILE="%WPUBLIC%\bin\Download.ps1"
|
set PSFILE="%WPUBLIC%\bin\Download.ps1"
|
||||||
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE%
|
%POWERSHELL% -ExecutionPolicy Bypass -File %PSFILE%
|
||||||
|
|
||||||
@REM if exist "C:\Program Files\OpenSSH\sshd.exe" (
|
echo "NEW installation"
|
||||||
@REM echo "OPENSSH already installed"
|
robocopy "%PACKAGES%\OpenSSH-Win64" "C:\Program Files\OpenSSH" /E
|
||||||
@REM )
|
|
||||||
@REM else (
|
|
||||||
echo "NEW installation"
|
|
||||||
robocopy "%PACKAGES%\OpenSSH-Win64" "C:\Program Files\OpenSSH" /E
|
|
||||||
@REM )
|
|
||||||
|
|
||||||
echo "------- attempting install"
|
echo "------- Attempting install"
|
||||||
set PSFILE="C:\Program Files\OpenSSH\install-sshd.ps1"
|
set PSFILE="C:\Program Files\OpenSSH\install-sshd.ps1"
|
||||||
if exist %PSFILE% (
|
if exist %PSFILE% (
|
||||||
echo "SSH install script"
|
echo "SSH install script"
|
||||||
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE%
|
%POWERSHELL% -ExecutionPolicy Bypass -File %PSFILE%
|
||||||
)
|
)
|
||||||
|
|
||||||
echo "------- fix firewall"
|
echo "------- Fix firewall"
|
||||||
set PSFILE="%WPUBLIC%\bin\Firewall.ps1"
|
set PSFILE="%WPUBLIC%\bin\Firewall.ps1"
|
||||||
if exist %PSFILE% (
|
if exist %PSFILE% (
|
||||||
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE%
|
%POWERSHELL% -ExecutionPolicy Bypass -File %PSFILE%
|
||||||
net start sshd
|
net start sshd
|
||||||
)
|
)
|
||||||
|
|
||||||
curl.exe --output C:\BaseGitClone.bat --url https://mint.nopenso.com/mirror/wBase/raw/branch/main/BaseGitClone.bat
|
curl.exe --output C:\BaseGitClone.bat --url https://git.cabinbagonly.com/mirror/wBase/raw/branch/main/BaseGitClone.bat
|
||||||
|
curl.exe --output C:\pull.bat --url https://git.cabinbagonly.com/mirror/wPublic/raw/branch/main/bin/pull.bat
|
||||||
|
|
||||||
|
call C:\pull.bat
|
||||||
|
call C:\Scripts\wbase\bin\SpeedUpPS.bat
|
||||||
|
|||||||
@ -1,43 +0,0 @@
|
|||||||
function listAumids( $userAccount ) {
|
|
||||||
|
|
||||||
if ($userAccount -eq "allusers")
|
|
||||||
{
|
|
||||||
# Find installed packages for all accounts. Must be run as an administrator in order to use this option.
|
|
||||||
$installedapps = Get-AppxPackage -allusers
|
|
||||||
}
|
|
||||||
elseif ($userAccount)
|
|
||||||
{
|
|
||||||
# Find installed packages for the specified account. Must be run as an administrator in order to use this option.
|
|
||||||
$installedapps = get-AppxPackage -user $userAccount
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
# Find installed packages for the current account.
|
|
||||||
$installedapps = get-AppxPackage
|
|
||||||
}
|
|
||||||
|
|
||||||
$aumidList = @()
|
|
||||||
foreach ($app in $installedapps)
|
|
||||||
{
|
|
||||||
foreach ($id in (Get-AppxPackageManifest $app).package.applications.application.id)
|
|
||||||
{
|
|
||||||
$aumidList += $app.packagefamilyname + "!" + $id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $aumidList
|
|
||||||
}
|
|
||||||
|
|
||||||
# Get a list of AUMIDs for the current account:
|
|
||||||
listAumids
|
|
||||||
|
|
||||||
# Get a list of AUMIDs for an account named “CustomerAccount”:
|
|
||||||
listAumids("CustomerAccount")
|
|
||||||
|
|
||||||
# Get a list of AUMIDs for all accounts on the device:
|
|
||||||
listAumids("allusers")
|
|
||||||
|
|
||||||
get-wmiobject Win32_Product | Format-Table IdentifyingNumber, Name, LocalPackage -AutoSize
|
|
||||||
|
|
||||||
|
|
||||||
Get-AppxPackage -allusers
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
@echo off
|
|
||||||
set check_computername=%COMPUTERNAME%
|
|
||||||
echo "Found computer %check_computername%"
|
|
||||||
|
|
||||||
set PACKAGES="C:\Packages"
|
|
||||||
set WPUBLIC="C:\wPublic"
|
|
||||||
|
|
||||||
echo "Dump software list"
|
|
||||||
set PSFILE="%WPUBLIC%\bin\ListSoftware.ps1"
|
|
||||||
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE% > "C:\%check_computername%.txt"
|
|
||||||
@ -1,18 +0,0 @@
|
|||||||
function Optimize-PowershellAssemblies {
|
|
||||||
# NGEN powershell assembly, improves startup time of powershell by 10x
|
|
||||||
$old_path = $env:path
|
|
||||||
try {
|
|
||||||
$env:path = [Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory()
|
|
||||||
[AppDomain]::CurrentDomain.GetAssemblies() | % {
|
|
||||||
if (! $_.location) {continue}
|
|
||||||
$Name = Split-Path $_.location -leaf
|
|
||||||
if ($Name.startswith("Microsoft.PowerShell.")) {
|
|
||||||
Write-Progress -Activity "Native Image Installation" -Status "$name"
|
|
||||||
ngen install $_.location | % {"`t$_"}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
$env:path = $old_path
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Optimize-PowershellAssemblies
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
@echo off
|
|
||||||
set check_computername=%COMPUTERNAME%
|
|
||||||
echo "Found computer %check_computername%"
|
|
||||||
|
|
||||||
set PACKAGES="C:\Packages"
|
|
||||||
set WPUBLIC="C:\wPublic"
|
|
||||||
|
|
||||||
echo "Speed up Powershell processing"
|
|
||||||
set PSFILE="%WPUBLIC%\bin\SpeedUp.ps1"
|
|
||||||
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE%
|
|
||||||
|
|
||||||
16
bin/pull.bat
Normal file
16
bin/pull.bat
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
if not exist "C:\Packages" mkdir "C:\Packages"
|
||||||
|
if not exist "C:\Scripts" mkdir "C:\Scripts"
|
||||||
|
|
||||||
|
cd \packages
|
||||||
|
curl --ssl-no-revoke -o c:\Packages\wlocal.zip https://git.cabinbagonly.com/mirror/wLocal/archive/main.zip
|
||||||
|
curl --ssl-no-revoke -o c:\Packages\wbase.zip https://git.cabinbagonly.com/mirror/wBase/archive/main.zip
|
||||||
|
curl --ssl-no-revoke -o c:\Packages\wpublic.zip https://git.cabinbagonly.com/mirror/wPublic/archive/main.zip
|
||||||
|
|
||||||
|
cd \scripts
|
||||||
|
tar -xvf c:\Packages\wlocal.zip
|
||||||
|
tar -xvf c:\Packages\wbase.zip
|
||||||
|
tar -xvf c:\Packages\wpublic.zip
|
||||||
|
|
||||||
|
del \pull.bat
|
||||||
|
|
||||||
Reference in New Issue
Block a user