diff --git a/scripts/start.ps1 b/scripts/start.ps1 index 5cde60ed..02c2c95d 100644 --- a/scripts/start.ps1 +++ b/scripts/start.ps1 @@ -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