V1.2.4 Release

This commit is contained in:
Olai Vike Bøe 2022-09-19 12:53:53 +02:00
parent c6cf976a8d
commit 421fe30236

View file

@ -41,25 +41,47 @@ function CheckBoxFunc {
$button5.Visible = $true
$button6.Visible = $false
}
$button5reboot
}
function CheckBoxFunc2 {
if ($checkBox2.Checked)
{
$button8.Visible = $true
$button1.Visible = $false
}
else
{
$button8.Visible = $false
$button1.Visible = $true
}
}
function GetWindowsUpdates {
(
Get-WindowsUpdate -AcceptAll -Install
Get-WindowsUpdate -AcceptAll -WindowsUpdate -ForceDownload
)
$button1.Visible = $false
$button8.Visible = $false
}
function GetWindowsUpdates2 {
(
Get-WindowsUpdate -AcceptAll -MicrosoftUpdate -ForceDownload
)
$button1.Visible = $false
$button8.Visible = $false
}
function UpdateWindowsUpdatesnoReboot {
(
Install-WindowsUpdate -Confirm -AcceptAll
Install-WindowsUpdate -Confirm -AcceptAll -ForceInstall
)
}
function UpdateWindowsUpdateswithReboot {
(
Install-WindowsUpdate -Confirm -AcceptAll -AutoReboot
Install-WindowsUpdate -Confirm -AcceptAll -AutoReboot -ForceInstall
)
}
@ -94,6 +116,16 @@ $button1.TabIndex = 0
$button1.Text = "Get Windows Updates"
$button1.Add_Click({GetWindowsUpdates})
[System.Windows.Forms.Application]::EnableVisualStyles()
$button8 = New-Object System.Windows.Forms.Button
$button8.Location = '12, 5'
$button8.Name = "Get Windows Updates"
$button8.Size = '95, 55'
$button8.Visible = $false
$button8.TabIndex = 0
$button8.Text = "Get Windows Updates"
$button8.Add_Click({GetWindowsUpdates2})
[System.Windows.Forms.Application]::EnableVisualStyles()
$button5 = New-Object System.Windows.Forms.Button
$button5.Location = '12, 5'
@ -150,11 +182,17 @@ $button4.Text = "Edit Winget Software"
$button4.Add_Click({EditWinget})
$checkBox = new-object System.Windows.Forms.checkbox
$checkBox.Location = '12, 55'
$checkBox.Size = '95, 55'
$checkBox.Location = '12, 65'
$checkBox.Size = '85, 15'
$checkBox.Text = "AutoReboot"
$checkBox.Add_Click({CheckBoxFunc})
$checkBox2 = new-object System.Windows.Forms.checkbox
$checkBox2.Location = '12, 65'
$checkBox2.Size = '95, 55'
$checkBox2.Text = "Microsoft Update"
$checkBox2.Add_Click({CheckBoxFunc2})
$AutoReboot = New-Object System.Windows.Forms.TextBox
$AutoReboot.Location = '12, 175'
$AutoReboot.Multiline = $true
@ -165,9 +203,17 @@ $AutoReboot.Visible = $false
$AutoReboot.BackColor = "White"
$VersionLabel = New-Object System.Windows.Forms.Label
#Release Label
$VersionLabel.Location = '266, 90'
#Release Label
#Preview Label
#$VersionLabel.Location = '216, 90'
#Preview Label
$VersionLabel.Name = 'Versionlabel'
$VersionLabel.Text = "Version 1.2.2"
$VersionLabel.Text = "Version 1.2.4"
$VersionLabel.Size = '490, 500'
$Form = New-Object System.Windows.Forms.Form
@ -178,6 +224,7 @@ $Form.Text = "Windows and Winget Updates"
$Form.MaximizeBox = $False
$Form.ShowInTaskbar = $true
$Form.Controls.Add($button1)
$Form.Controls.Add($button8)
$Form.Controls.Add($button2)
$Form.Controls.Add($button3)
$Form.Controls.Add($button7)
@ -185,6 +232,7 @@ $Form.Controls.Add($button4)
$Form.Controls.Add($button5)
$Form.Controls.Add($button6)
$Form.Controls.Add($checkBox)
$Form.Controls.Add($checkBox2)
$Form.Controls.Add($AutoReboot)
$Form.Controls.Add($VersionLabel)
$Form.Controls.Add($RichTextBoxDisplay)