mirror of
https://github.com/LSPosed/MagiskOnWSALocal.git
synced 2025-05-06 23:06:34 +08:00
Optimize VHD after install
This commit is contained in:
parent
87ec298263
commit
25dc1d6597
@ -1,4 +1,21 @@
|
|||||||
# Automated Install script by Midonei
|
# This file is part of MagiskOnWSALocal.
|
||||||
|
#
|
||||||
|
# MagiskOnWSALocal is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Affero General Public License as
|
||||||
|
# published by the Free Software Foundation, either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# MagiskOnWSALocal is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU Affero General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
|
# along with MagiskOnWSALocal. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# Copyright (C) 2023 LSPosed Contributors
|
||||||
|
#
|
||||||
|
|
||||||
$Host.UI.RawUI.WindowTitle = "Installing MagiskOnWSA...."
|
$Host.UI.RawUI.WindowTitle = "Installing MagiskOnWSA...."
|
||||||
function Test-Administrator {
|
function Test-Administrator {
|
||||||
[OutputType([bool])]
|
[OutputType([bool])]
|
||||||
@ -19,7 +36,18 @@ function Get-InstalledDependencyVersion {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Function Test-CommandExists {
|
||||||
|
Param ($command)
|
||||||
|
$oldPreference = $ErrorActionPreference
|
||||||
|
$ErrorActionPreference = 'stop'
|
||||||
|
try { if (Get-Command $command) { RETURN $true } }
|
||||||
|
Catch { Write-Host "$command does not exist"; RETURN $false }
|
||||||
|
Finally { $ErrorActionPreference = $oldPreference }
|
||||||
|
} #end function test-CommandExists
|
||||||
|
|
||||||
function Finish {
|
function Finish {
|
||||||
|
Write-Host "Optimizing VHDX size...."
|
||||||
|
If (Test-CommandExists Optimize-VHD) { Optimize-VHD ".\*.vhdx" -Mode Full }
|
||||||
Clear-Host
|
Clear-Host
|
||||||
Start-Process "wsa://com.topjohnwu.magisk"
|
Start-Process "wsa://com.topjohnwu.magisk"
|
||||||
Start-Process "wsa://com.android.vending"
|
Start-Process "wsa://com.android.vending"
|
||||||
|
@ -1,4 +1,20 @@
|
|||||||
:: Automated Install batch script by Syuugo
|
:: This file is part of MagiskOnWSALocal.
|
||||||
|
::
|
||||||
|
:: MagiskOnWSALocal is free software: you can redistribute it and/or modify
|
||||||
|
:: it under the terms of the GNU Affero General Public License as
|
||||||
|
:: published by the Free Software Foundation, either version 3 of the
|
||||||
|
:: License, or (at your option) any later version.
|
||||||
|
::
|
||||||
|
:: MagiskOnWSALocal is distributed in the hope that it will be useful,
|
||||||
|
:: but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
:: GNU Affero General Public License for more details.
|
||||||
|
::
|
||||||
|
:: You should have received a copy of the GNU Affero General Public License
|
||||||
|
:: along with MagiskOnWSALocal. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
::
|
||||||
|
:: Copyright (C) 2023 LSPosed Contributors
|
||||||
|
::
|
||||||
|
|
||||||
@echo off
|
@echo off
|
||||||
if not exist Install.ps1 (
|
if not exist Install.ps1 (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user