mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-06-28 00:54:47 -05:00
Fixes, improvements + Auto Window handling (#2648)
* fixes - change fontsize back to 12 - add correct handling of windows - removed double click handling of winutil * readd double click * fixes - argument passing on elevation & to windev script - remove shell output of log * improve compile -run - added $args param for args that get passed to winutil - improved starting new Shell logic * fix: compile's run logic - removed old logic - fixed command to run in new shell - replaced $args with $arg * fix: logs & border - move log start to after admin elevation - fix color of border on fixed tweaks button. * fix: MicrowinInjectDrivers's Margin - use theme value instead of custom value * change microwin checkbox margin - set cutom microwin checkbox margin due to cut off content * fix layouting of nav bar - replace strange collumndefinition to fix bugs, make sense and look better * rename $arg to $Arguments * change maxresolution from 1380 to 1280
This commit is contained in:
15
Compile.ps1
15
Compile.ps1
@ -1,7 +1,8 @@
|
||||
param (
|
||||
[switch]$Debug,
|
||||
[switch]$Run,
|
||||
[switch]$SkipPreprocessing
|
||||
[switch]$SkipPreprocessing,
|
||||
[string]$Arguments
|
||||
)
|
||||
$OFS = "`r`n"
|
||||
$scriptname = "winutil.ps1"
|
||||
@ -118,10 +119,12 @@ catch {
|
||||
Write-Progress -Activity "Validating" -Completed
|
||||
|
||||
if ($run) {
|
||||
try {
|
||||
Start-Process -FilePath "pwsh" -ArgumentList "$workingdir\$scriptname"
|
||||
} catch {
|
||||
Start-Process -FilePath "powershell" -ArgumentList "$workingdir\$scriptname"
|
||||
}
|
||||
$script = "& '$workingdir\$scriptname' $Arguments"
|
||||
|
||||
$powershellcmd = if (Get-Command pwsh -ErrorAction SilentlyContinue) { "pwsh" } else { "powershell" }
|
||||
$processCmd = if (Get-Command wt.exe -ErrorAction SilentlyContinue) { "wt.exe" } else { $powershellcmd }
|
||||
|
||||
Start-Process $processCmd -ArgumentList "$powershellcmd -NoProfile -Command $script"
|
||||
|
||||
break
|
||||
}
|
||||
|
Reference in New Issue
Block a user