mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-04-06 06:38:31 +00:00
Update start.ps1 (#4141)
This commit is contained in:
@@ -27,26 +27,6 @@ if ($Noui) {
|
|||||||
$PARAM_NOUI = $true
|
$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)) {
|
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."
|
Write-Output "Winutil needs to be run as Administrator. Attempting to relaunch."
|
||||||
@@ -80,6 +60,26 @@ if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:
|
|||||||
break
|
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"
|
$dateTime = Get-Date -Format "yyyy-MM-dd_HH-mm-ss"
|
||||||
|
|
||||||
# Set the path for the winutil directory
|
# Set the path for the winutil directory
|
||||||
|
|||||||
Reference in New Issue
Block a user