[Fix] SecureString does not have Close method (#3531)

This commit is contained in:
CodingWonders
2025-08-05 17:30:09 +02:00
committed by GitHub
parent e2732da2db
commit af09bcbf0b

View File

@ -67,7 +67,6 @@ function Invoke-WPFInstall {
$password = $passwordBox.Text | ConvertTo-SecureString -AsPlainText -Force
if ($password) {
Set-LocalUser -Name $user -Password $password
$password.Close()
$Form.Close()
} else {
[System.Windows.Forms.MessageBox]::Show('No password entered!')