mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2026-03-12 17:51:46 +08:00
Update start.ps1 (#4141)
This commit is contained in:
@@ -27,26 +27,6 @@ if ($Noui) {
|
||||
$PARAM_NOUI = $true
|
||||
}
|
||||
|
||||
# Load DLLs
|
||||
Add-Type -AssemblyName PresentationFramework
|
||||
Add-Type -AssemblyName System.Windows.Forms
|
||||
|
||||
# Variable to sync between runspaces
|
||||
$sync = [Hashtable]::Synchronized(@{})
|
||||
$sync.PSScriptRoot = $PSScriptRoot
|
||||
$sync.version = "#{replaceme}"
|
||||
$sync.configs = @{}
|
||||
$sync.Buttons = [System.Collections.Generic.List[PSObject]]::new()
|
||||
$sync.preferences = @{}
|
||||
$sync.ProcessRunning = $false
|
||||
$sync.selectedApps = [System.Collections.Generic.List[string]]::new()
|
||||
$sync.selectedTweaks = [System.Collections.Generic.List[string]]::new()
|
||||
$sync.selectedToggles = [System.Collections.Generic.List[string]]::new()
|
||||
$sync.selectedFeatures = [System.Collections.Generic.List[string]]::new()
|
||||
$sync.currentTab = "Install"
|
||||
$sync.selectedAppsStackPanel
|
||||
$sync.selectedAppsPopup
|
||||
|
||||
|
||||
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
|
||||
Write-Output "Winutil needs to be run as Administrator. Attempting to relaunch."
|
||||
@@ -80,6 +60,26 @@ if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:
|
||||
break
|
||||
}
|
||||
|
||||
# Load DLLs
|
||||
Add-Type -AssemblyName PresentationFramework
|
||||
Add-Type -AssemblyName System.Windows.Forms
|
||||
|
||||
# Variable to sync between runspaces
|
||||
$sync = [Hashtable]::Synchronized(@{})
|
||||
$sync.PSScriptRoot = $PSScriptRoot
|
||||
$sync.version = "#{replaceme}"
|
||||
$sync.configs = @{}
|
||||
$sync.Buttons = [System.Collections.Generic.List[PSObject]]::new()
|
||||
$sync.preferences = @{}
|
||||
$sync.ProcessRunning = $false
|
||||
$sync.selectedApps = [System.Collections.Generic.List[string]]::new()
|
||||
$sync.selectedTweaks = [System.Collections.Generic.List[string]]::new()
|
||||
$sync.selectedToggles = [System.Collections.Generic.List[string]]::new()
|
||||
$sync.selectedFeatures = [System.Collections.Generic.List[string]]::new()
|
||||
$sync.currentTab = "Install"
|
||||
$sync.selectedAppsStackPanel
|
||||
$sync.selectedAppsPopup
|
||||
|
||||
$dateTime = Get-Date -Format "yyyy-MM-dd_HH-mm-ss"
|
||||
|
||||
# Set the path for the winutil directory
|
||||
|
||||
Reference in New Issue
Block a user