V1.2.4 Release
This commit is contained in:
parent
c6cf976a8d
commit
421fe30236
1 changed files with 56 additions and 8 deletions
64
Script.ps1
64
Script.ps1
|
@ -41,25 +41,47 @@ function CheckBoxFunc {
|
||||||
$button5.Visible = $true
|
$button5.Visible = $true
|
||||||
$button6.Visible = $false
|
$button6.Visible = $false
|
||||||
}
|
}
|
||||||
$button5reboot
|
}
|
||||||
|
|
||||||
|
function CheckBoxFunc2 {
|
||||||
|
if ($checkBox2.Checked)
|
||||||
|
{
|
||||||
|
$button8.Visible = $true
|
||||||
|
$button1.Visible = $false
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$button8.Visible = $false
|
||||||
|
$button1.Visible = $true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function GetWindowsUpdates {
|
function GetWindowsUpdates {
|
||||||
(
|
(
|
||||||
Get-WindowsUpdate -AcceptAll -Install
|
Get-WindowsUpdate -AcceptAll -WindowsUpdate -ForceDownload
|
||||||
)
|
)
|
||||||
$button1.Visible = $false
|
$button1.Visible = $false
|
||||||
|
$button8.Visible = $false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function GetWindowsUpdates2 {
|
||||||
|
(
|
||||||
|
Get-WindowsUpdate -AcceptAll -MicrosoftUpdate -ForceDownload
|
||||||
|
)
|
||||||
|
$button1.Visible = $false
|
||||||
|
$button8.Visible = $false
|
||||||
|
}
|
||||||
|
|
||||||
function UpdateWindowsUpdatesnoReboot {
|
function UpdateWindowsUpdatesnoReboot {
|
||||||
(
|
(
|
||||||
Install-WindowsUpdate -Confirm -AcceptAll
|
Install-WindowsUpdate -Confirm -AcceptAll -ForceInstall
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function UpdateWindowsUpdateswithReboot {
|
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.Text = "Get Windows Updates"
|
||||||
$button1.Add_Click({GetWindowsUpdates})
|
$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()
|
[System.Windows.Forms.Application]::EnableVisualStyles()
|
||||||
$button5 = New-Object System.Windows.Forms.Button
|
$button5 = New-Object System.Windows.Forms.Button
|
||||||
$button5.Location = '12, 5'
|
$button5.Location = '12, 5'
|
||||||
|
@ -150,11 +182,17 @@ $button4.Text = "Edit Winget Software"
|
||||||
$button4.Add_Click({EditWinget})
|
$button4.Add_Click({EditWinget})
|
||||||
|
|
||||||
$checkBox = new-object System.Windows.Forms.checkbox
|
$checkBox = new-object System.Windows.Forms.checkbox
|
||||||
$checkBox.Location = '12, 55'
|
$checkBox.Location = '12, 65'
|
||||||
$checkBox.Size = '95, 55'
|
$checkBox.Size = '85, 15'
|
||||||
$checkBox.Text = "AutoReboot"
|
$checkBox.Text = "AutoReboot"
|
||||||
$checkBox.Add_Click({CheckBoxFunc})
|
$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 = New-Object System.Windows.Forms.TextBox
|
||||||
$AutoReboot.Location = '12, 175'
|
$AutoReboot.Location = '12, 175'
|
||||||
$AutoReboot.Multiline = $true
|
$AutoReboot.Multiline = $true
|
||||||
|
@ -165,9 +203,17 @@ $AutoReboot.Visible = $false
|
||||||
$AutoReboot.BackColor = "White"
|
$AutoReboot.BackColor = "White"
|
||||||
|
|
||||||
$VersionLabel = New-Object System.Windows.Forms.Label
|
$VersionLabel = New-Object System.Windows.Forms.Label
|
||||||
|
|
||||||
|
#Release Label
|
||||||
$VersionLabel.Location = '266, 90'
|
$VersionLabel.Location = '266, 90'
|
||||||
|
#Release Label
|
||||||
|
|
||||||
|
#Preview Label
|
||||||
|
#$VersionLabel.Location = '216, 90'
|
||||||
|
#Preview Label
|
||||||
|
|
||||||
$VersionLabel.Name = 'Versionlabel'
|
$VersionLabel.Name = 'Versionlabel'
|
||||||
$VersionLabel.Text = "Version 1.2.2"
|
$VersionLabel.Text = "Version 1.2.4"
|
||||||
$VersionLabel.Size = '490, 500'
|
$VersionLabel.Size = '490, 500'
|
||||||
|
|
||||||
$Form = New-Object System.Windows.Forms.Form
|
$Form = New-Object System.Windows.Forms.Form
|
||||||
|
@ -178,6 +224,7 @@ $Form.Text = "Windows and Winget Updates"
|
||||||
$Form.MaximizeBox = $False
|
$Form.MaximizeBox = $False
|
||||||
$Form.ShowInTaskbar = $true
|
$Form.ShowInTaskbar = $true
|
||||||
$Form.Controls.Add($button1)
|
$Form.Controls.Add($button1)
|
||||||
|
$Form.Controls.Add($button8)
|
||||||
$Form.Controls.Add($button2)
|
$Form.Controls.Add($button2)
|
||||||
$Form.Controls.Add($button3)
|
$Form.Controls.Add($button3)
|
||||||
$Form.Controls.Add($button7)
|
$Form.Controls.Add($button7)
|
||||||
|
@ -185,6 +232,7 @@ $Form.Controls.Add($button4)
|
||||||
$Form.Controls.Add($button5)
|
$Form.Controls.Add($button5)
|
||||||
$Form.Controls.Add($button6)
|
$Form.Controls.Add($button6)
|
||||||
$Form.Controls.Add($checkBox)
|
$Form.Controls.Add($checkBox)
|
||||||
|
$Form.Controls.Add($checkBox2)
|
||||||
$Form.Controls.Add($AutoReboot)
|
$Form.Controls.Add($AutoReboot)
|
||||||
$Form.Controls.Add($VersionLabel)
|
$Form.Controls.Add($VersionLabel)
|
||||||
$Form.Controls.Add($RichTextBoxDisplay)
|
$Form.Controls.Add($RichTextBoxDisplay)
|
||||||
|
@ -213,4 +261,4 @@ else
|
||||||
|
|
||||||
[void]$Form.ShowDialog()
|
[void]$Form.ShowDialog()
|
||||||
[void]$stream.Dispose()
|
[void]$stream.Dispose()
|
||||||
[void]$Form.Dispose()
|
[void]$Form.Dispose()
|
||||||
|
|
Loading…
Reference in a new issue