Test 2023 12 19 (#1294)
* Compile Winutil
* Issue #1283, #1280 fixes, more (#1288)
* Explorer Fix
* Wifi, Explorer Crash, WinUtil Icon fixes. First attempt at white theme
* White theme
* Fix for clashing microwin directories if process fails, now new directory will be generated
* * Tested latest Windows 10 (22H2) images work fine
* Made dialog box more clear for issue #1283
* Added better logic for handling takeown /D flag for different locals issue #1280
* Refreshed the UI to more modern look
* Improved white theme
* Regrouped Tweak tab to make more sense
* Advanced tweaks were in a separate column but the button applied both Essential and advanced now they are in the same column and button applies both
* All instant action buttons were moved to Customize preferences column
* Explorer lockup Fix
* Wifi, Explorer Crash, WinUtil Icon fixes.
* Fix for clashing microwin directories if process fails, now new directory will be generated
* Merge all
* Theme improvement, adding icon to the shortcut
* Ability to download oscdimg from github, reorginizing Apps to fit better on more (smaller screens)
* Fixing release branch to WinUtil
* Adding double click to fullscreen
* Update Get-Oscdimg.ps1
---------
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: Chris Titus <contact@christitus.com>
* Update winutil.ps1
* remove merc and thorium
* Ashlyn Programs
* Also inject drivers into boot.wim
* copy #1291
new branch
---------
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
Co-authored-by: KonTy <9524513+KonTy@users.noreply.github.com>
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: Cedric Lewe <0skillallluck@pm.me>
2023-12-19 13:55:55 -06:00
|
|
|
|
2023-05-09 13:14:27 -05:00
|
|
|
function Invoke-WPFShortcut {
|
|
|
|
<#
|
|
|
|
|
2023-10-19 17:12:55 -05:00
|
|
|
.SYNOPSIS
|
|
|
|
Creates a shortcut and prompts for a save location
|
|
|
|
|
|
|
|
.PARAMETER ShortcutToAdd
|
|
|
|
The name of the shortcut to add
|
2023-05-09 13:14:27 -05:00
|
|
|
|
|
|
|
#>
|
|
|
|
param($ShortcutToAdd)
|
|
|
|
|
Test 2023 12 19 (#1294)
* Compile Winutil
* Issue #1283, #1280 fixes, more (#1288)
* Explorer Fix
* Wifi, Explorer Crash, WinUtil Icon fixes. First attempt at white theme
* White theme
* Fix for clashing microwin directories if process fails, now new directory will be generated
* * Tested latest Windows 10 (22H2) images work fine
* Made dialog box more clear for issue #1283
* Added better logic for handling takeown /D flag for different locals issue #1280
* Refreshed the UI to more modern look
* Improved white theme
* Regrouped Tweak tab to make more sense
* Advanced tweaks were in a separate column but the button applied both Essential and advanced now they are in the same column and button applies both
* All instant action buttons were moved to Customize preferences column
* Explorer lockup Fix
* Wifi, Explorer Crash, WinUtil Icon fixes.
* Fix for clashing microwin directories if process fails, now new directory will be generated
* Merge all
* Theme improvement, adding icon to the shortcut
* Ability to download oscdimg from github, reorginizing Apps to fit better on more (smaller screens)
* Fixing release branch to WinUtil
* Adding double click to fullscreen
* Update Get-Oscdimg.ps1
---------
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: Chris Titus <contact@christitus.com>
* Update winutil.ps1
* remove merc and thorium
* Ashlyn Programs
* Also inject drivers into boot.wim
* copy #1291
new branch
---------
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
Co-authored-by: KonTy <9524513+KonTy@users.noreply.github.com>
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: Cedric Lewe <0skillallluck@pm.me>
2023-12-19 13:55:55 -06:00
|
|
|
$iconPath = $null
|
|
|
|
Switch ($ShortcutToAdd) {
|
2023-05-09 13:14:27 -05:00
|
|
|
"WinUtil" {
|
2023-11-14 15:45:48 -06:00
|
|
|
$SourceExe = "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell.exe"
|
2023-05-09 13:14:27 -05:00
|
|
|
$IRM = 'irm https://christitus.com/win | iex'
|
|
|
|
$Powershell = '-ExecutionPolicy Bypass -Command "Start-Process powershell.exe -verb runas -ArgumentList'
|
|
|
|
$ArgumentsToSourceExe = "$powershell '$IRM'"
|
|
|
|
$DestinationName = "WinUtil.lnk"
|
Test 2023 12 19 (#1294)
* Compile Winutil
* Issue #1283, #1280 fixes, more (#1288)
* Explorer Fix
* Wifi, Explorer Crash, WinUtil Icon fixes. First attempt at white theme
* White theme
* Fix for clashing microwin directories if process fails, now new directory will be generated
* * Tested latest Windows 10 (22H2) images work fine
* Made dialog box more clear for issue #1283
* Added better logic for handling takeown /D flag for different locals issue #1280
* Refreshed the UI to more modern look
* Improved white theme
* Regrouped Tweak tab to make more sense
* Advanced tweaks were in a separate column but the button applied both Essential and advanced now they are in the same column and button applies both
* All instant action buttons were moved to Customize preferences column
* Explorer lockup Fix
* Wifi, Explorer Crash, WinUtil Icon fixes.
* Fix for clashing microwin directories if process fails, now new directory will be generated
* Merge all
* Theme improvement, adding icon to the shortcut
* Ability to download oscdimg from github, reorginizing Apps to fit better on more (smaller screens)
* Fixing release branch to WinUtil
* Adding double click to fullscreen
* Update Get-Oscdimg.ps1
---------
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: Chris Titus <contact@christitus.com>
* Update winutil.ps1
* remove merc and thorium
* Ashlyn Programs
* Also inject drivers into boot.wim
* copy #1291
new branch
---------
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
Co-authored-by: KonTy <9524513+KonTy@users.noreply.github.com>
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: Cedric Lewe <0skillallluck@pm.me>
2023-12-19 13:55:55 -06:00
|
|
|
|
|
|
|
if (Test-Path -Path "$env:TEMP\cttlogo.png") {
|
|
|
|
$iconPath = "$env:SystempRoot\cttlogo.ico"
|
|
|
|
ConvertTo-Icon -bitmapPath "$env:TEMP\cttlogo.png" -iconPath $iconPath
|
|
|
|
}
|
2023-05-09 13:14:27 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$FileBrowser = New-Object System.Windows.Forms.SaveFileDialog
|
|
|
|
$FileBrowser.InitialDirectory = [Environment]::GetFolderPath('Desktop')
|
|
|
|
$FileBrowser.Filter = "Shortcut Files (*.lnk)|*.lnk"
|
|
|
|
$FileBrowser.FileName = $DestinationName
|
|
|
|
$FileBrowser.ShowDialog() | Out-Null
|
|
|
|
|
|
|
|
$WshShell = New-Object -comObject WScript.Shell
|
|
|
|
$Shortcut = $WshShell.CreateShortcut($FileBrowser.FileName)
|
|
|
|
$Shortcut.TargetPath = $SourceExe
|
|
|
|
$Shortcut.Arguments = $ArgumentsToSourceExe
|
Test 2023 12 19 (#1294)
* Compile Winutil
* Issue #1283, #1280 fixes, more (#1288)
* Explorer Fix
* Wifi, Explorer Crash, WinUtil Icon fixes. First attempt at white theme
* White theme
* Fix for clashing microwin directories if process fails, now new directory will be generated
* * Tested latest Windows 10 (22H2) images work fine
* Made dialog box more clear for issue #1283
* Added better logic for handling takeown /D flag for different locals issue #1280
* Refreshed the UI to more modern look
* Improved white theme
* Regrouped Tweak tab to make more sense
* Advanced tweaks were in a separate column but the button applied both Essential and advanced now they are in the same column and button applies both
* All instant action buttons were moved to Customize preferences column
* Explorer lockup Fix
* Wifi, Explorer Crash, WinUtil Icon fixes.
* Fix for clashing microwin directories if process fails, now new directory will be generated
* Merge all
* Theme improvement, adding icon to the shortcut
* Ability to download oscdimg from github, reorginizing Apps to fit better on more (smaller screens)
* Fixing release branch to WinUtil
* Adding double click to fullscreen
* Update Get-Oscdimg.ps1
---------
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: Chris Titus <contact@christitus.com>
* Update winutil.ps1
* remove merc and thorium
* Ashlyn Programs
* Also inject drivers into boot.wim
* copy #1291
new branch
---------
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
Co-authored-by: KonTy <9524513+KonTy@users.noreply.github.com>
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: Cedric Lewe <0skillallluck@pm.me>
2023-12-19 13:55:55 -06:00
|
|
|
if ($iconPath -ne $null) {
|
|
|
|
$shortcut.IconLocation = $iconPath
|
|
|
|
}
|
2023-05-09 13:14:27 -05:00
|
|
|
$Shortcut.Save()
|
2023-10-19 17:12:55 -05:00
|
|
|
|
2023-05-09 13:14:27 -05:00
|
|
|
Write-Host "Shortcut for $ShortcutToAdd has been saved to $($FileBrowser.FileName)"
|
|
|
|
}
|