mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-01-17 18:27:42 -06:00
Fix scratch textbox bug
* Fix scratch textbox bug * Fixing Microwin, no more errors and it creats image now without issues
This commit is contained in:
parent
e2de347bcb
commit
83ea3eb82c
@ -23,10 +23,6 @@ function Invoke-WPFGetIso {
|
|||||||
Write-Host "\/ \/|_| \___||_| \___/ \/ \/ |_||_| |_| "
|
Write-Host "\/ \/|_| \___||_| \___/ \/ \/ |_||_| |_| "
|
||||||
|
|
||||||
$oscdimgPath = Join-Path $env:TEMP 'oscdimg.exe'
|
$oscdimgPath = Join-Path $env:TEMP 'oscdimg.exe'
|
||||||
if( ! (Test-Path $oscdimgPath -PathType Leaf) ) {
|
|
||||||
$oscdimgPath = Join-Path '.\releases\' 'oscdimg.exe'
|
|
||||||
}
|
|
||||||
|
|
||||||
$oscdImgFound = [bool] (Get-Command -ErrorAction Ignore -Type Application oscdimg.exe) -or (Test-Path $oscdimgPath -PathType Leaf)
|
$oscdImgFound = [bool] (Get-Command -ErrorAction Ignore -Type Application oscdimg.exe) -or (Test-Path $oscdimgPath -PathType Leaf)
|
||||||
Write-Host "oscdimg.exe on system: $oscdImgFound"
|
Write-Host "oscdimg.exe on system: $oscdImgFound"
|
||||||
|
|
||||||
|
@ -244,26 +244,27 @@ public class PowerManagement {
|
|||||||
$desktopDir = "$($scratchDir)\Windows\Users\Default\Desktop"
|
$desktopDir = "$($scratchDir)\Windows\Users\Default\Desktop"
|
||||||
New-Item -ItemType Directory -Force -Path "$desktopDir"
|
New-Item -ItemType Directory -Force -Path "$desktopDir"
|
||||||
dism /English /image:$($scratchDir) /set-profilepath:"$($scratchDir)\Windows\Users\Default"
|
dism /English /image:$($scratchDir) /set-profilepath:"$($scratchDir)\Windows\Users\Default"
|
||||||
$command = "powershell.exe -NoProfile -ExecutionPolicy Bypass -Command 'irm https://christitus.com/win | iex'"
|
|
||||||
$shortcutPath = "$desktopDir\WinUtil.lnk"
|
|
||||||
$shell = New-Object -ComObject WScript.Shell
|
|
||||||
$shortcut = $shell.CreateShortcut($shortcutPath)
|
|
||||||
|
|
||||||
if (Test-Path -Path "$env:TEMP\cttlogo.png")
|
# $command = "powershell.exe -NoProfile -ExecutionPolicy Bypass -Command 'irm https://christitus.com/win | iex'"
|
||||||
{
|
# $shortcutPath = "$desktopDir\WinUtil.lnk"
|
||||||
$pngPath = "$env:TEMP\cttlogo.png"
|
# $shell = New-Object -ComObject WScript.Shell
|
||||||
$icoPath = "$env:TEMP\cttlogo.ico"
|
# $shortcut = $shell.CreateShortcut($shortcutPath)
|
||||||
ConvertTo-Icon -bitmapPath $pngPath -iconPath $icoPath
|
|
||||||
Write-Host "ICO file created at: $icoPath"
|
|
||||||
Copy-Item "$env:TEMP\cttlogo.png" "$($scratchDir)\Windows\cttlogo.png" -force
|
|
||||||
Copy-Item "$env:TEMP\cttlogo.ico" "$($scratchDir)\Windows\cttlogo.ico" -force
|
|
||||||
$shortcut.IconLocation = "c:\Windows\cttlogo.ico"
|
|
||||||
}
|
|
||||||
|
|
||||||
$shortcut.TargetPath = "powershell.exe"
|
# if (Test-Path -Path "$env:TEMP\cttlogo.png")
|
||||||
$shortcut.Arguments = "-NoProfile -ExecutionPolicy Bypass -Command `"$command`""
|
# {
|
||||||
$shortcut.Save()
|
# $pngPath = "$env:TEMP\cttlogo.png"
|
||||||
Write-Host "Shortcut to winutil created at: $shortcutPath"
|
# $icoPath = "$env:TEMP\cttlogo.ico"
|
||||||
|
# ConvertTo-Icon -bitmapPath $pngPath -iconPath $icoPath
|
||||||
|
# Write-Host "ICO file created at: $icoPath"
|
||||||
|
# Copy-Item "$env:TEMP\cttlogo.png" "$($scratchDir)\Windows\cttlogo.png" -force
|
||||||
|
# Copy-Item "$env:TEMP\cttlogo.ico" "$($scratchDir)\Windows\cttlogo.ico" -force
|
||||||
|
# $shortcut.IconLocation = "c:\Windows\cttlogo.ico"
|
||||||
|
# }
|
||||||
|
|
||||||
|
# $shortcut.TargetPath = "powershell.exe"
|
||||||
|
# $shortcut.Arguments = "-NoProfile -ExecutionPolicy Bypass -Command `"$command`""
|
||||||
|
# $shortcut.Save()
|
||||||
|
# Write-Host "Shortcut to winutil created at: $shortcutPath"
|
||||||
# *************************** Automation black ***************************
|
# *************************** Automation black ***************************
|
||||||
|
|
||||||
Write-Host "Copy checkinstall.cmd into the ISO"
|
Write-Host "Copy checkinstall.cmd into the ISO"
|
||||||
|
@ -772,20 +772,29 @@
|
|||||||
</TextBlock>
|
</TextBlock>
|
||||||
<CheckBox x:Name="WPFMicrowinISOScratchDir" Content="Use ISO directory for ScratchDir " IsChecked="False" Margin="1"
|
<CheckBox x:Name="WPFMicrowinISOScratchDir" Content="Use ISO directory for ScratchDir " IsChecked="False" Margin="1"
|
||||||
ToolTip="Use ISO directory for ScratchDir " />
|
ToolTip="Use ISO directory for ScratchDir " />
|
||||||
|
<Grid>
|
||||||
<Button Name="MicrowinScratchDirBT" Margin="2" Padding="1">
|
<Grid.ColumnDefinitions>
|
||||||
<Button.Content>
|
<ColumnDefinition Width="*" /> <!-- Takes the remaining space -->
|
||||||
|
<ColumnDefinition Width="30" /> <!-- Fixed width for Button -->
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
<TextBox Name="MicrowinScratchDirBox" Background="Transparent" BorderBrush="{MainForegroundColor}"
|
<TextBox Name="MicrowinScratchDirBox" Background="Transparent" BorderBrush="{MainForegroundColor}"
|
||||||
Text="Scratch" Padding="0"
|
Text="Scratch"
|
||||||
ToolTip="Alt Path For Scratch Directory" BorderThickness="1"
|
Margin="2"
|
||||||
Margin="0,0,0,3" HorizontalAlignment="Left"
|
|
||||||
IsReadOnly="False"
|
IsReadOnly="False"
|
||||||
Height="Auto"
|
ToolTip="Alt Path For Scratch Directory"
|
||||||
Width="110"
|
Grid.Column="0"
|
||||||
Foreground="{ButtonForegroundColor}"
|
VerticalAlignment="Center"
|
||||||
/>
|
Foreground="{LabelboxForegroundColor}">
|
||||||
|
</TextBox>
|
||||||
|
<Button Name="MicrowinScratchDirBT"
|
||||||
|
Grid.Column="1"
|
||||||
|
Margin="2"
|
||||||
|
Padding="1" VerticalAlignment="Center">
|
||||||
|
<Button.Content>
|
||||||
|
...
|
||||||
</Button.Content>
|
</Button.Content>
|
||||||
</Button>
|
</Button>
|
||||||
|
</Grid>
|
||||||
<TextBox Name="MicrowinFinalIsoLocation" Background="Transparent" BorderBrush="{MainForegroundColor}"
|
<TextBox Name="MicrowinFinalIsoLocation" Background="Transparent" BorderBrush="{MainForegroundColor}"
|
||||||
Text="ISO location will be printed here"
|
Text="ISO location will be printed here"
|
||||||
Margin="2"
|
Margin="2"
|
||||||
|
Loading…
Reference in New Issue
Block a user