mirror of
https://github.com/ntdevlabs/tiny11builder.git
synced 2025-12-18 09:24:12 +00:00
Update tiny11makerGUI.ps1
This commit is contained in:
parent
4e4fecbd24
commit
39e0d5dd4c
1 changed files with 2 additions and 13 deletions
|
|
@ -3,18 +3,7 @@ $t = '[DllImport("user32.dll")] public static extern bool ShowWindow(int handle,
|
||||||
add-type -name win -member $t -namespace native
|
add-type -name win -member $t -namespace native
|
||||||
[native.win]::ShowWindow(([System.Diagnostics.Process]::GetCurrentProcess() | Get-Process).MainWindowHandle, 0) # by Andy Lowry found at : https://stackoverflow.com/questions/1802127/how-to-run-a-powershell-script-without-displaying-a-window
|
[native.win]::ShowWindow(([System.Diagnostics.Process]::GetCurrentProcess() | Get-Process).MainWindowHandle, 0) # by Andy Lowry found at : https://stackoverflow.com/questions/1802127/how-to-run-a-powershell-script-without-displaying-a-window
|
||||||
|
|
||||||
param (
|
$ScratchDisk = $PSScriptRoot -replace '[\\]+$', ''
|
||||||
[ValidatePattern('^[c-zC-Z]$')]
|
|
||||||
[string]$ScratchDisk
|
|
||||||
)
|
|
||||||
|
|
||||||
if (-not $ScratchDisk) {
|
|
||||||
$ScratchDisk = $PSScriptRoot -replace '[\\]+$', ''
|
|
||||||
} else {
|
|
||||||
$ScratchDisk = $ScratchDisk + ":"
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Output "Scratch disk set to $ScratchDisk"
|
|
||||||
|
|
||||||
# Check if PowerShell execution is restricted
|
# Check if PowerShell execution is restricted
|
||||||
if ((Get-ExecutionPolicy) -eq 'Restricted') {
|
if ((Get-ExecutionPolicy) -eq 'Restricted') {
|
||||||
|
|
@ -676,7 +665,7 @@ $LogsTextBox.Height = 180
|
||||||
$LogsTextBox.ReadOnly = $true
|
$LogsTextBox.ReadOnly = $true
|
||||||
Add-Log "main_form.Controls loaded..."
|
Add-Log "main_form.Controls loaded..."
|
||||||
Add-Log " "
|
Add-Log " "
|
||||||
Add-Log "...Please select à Windows ISO file..."
|
Add-Log "...Please select à Windows ISO file..."
|
||||||
|
|
||||||
# Adding Controls to Form
|
# Adding Controls to Form
|
||||||
$main_form.Controls.Add($TitleLabel)
|
$main_form.Controls.Add($TitleLabel)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue