Add a function for removing the RunOnce
key
This commit is contained in:
parent
3ad0fcf95e
commit
6dba078a44
1 changed files with 15 additions and 0 deletions
|
@ -96,6 +96,21 @@ $null = New-Module {
|
||||||
$key.Handle.Close();
|
$key.Handle.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Clears leftovers from past registrations.
|
||||||
|
#>
|
||||||
|
function Clear-SetupRegistration {
|
||||||
|
Edit-DefaultUserKey {
|
||||||
|
param(
|
||||||
|
[RegistryKey] $Key
|
||||||
|
)
|
||||||
|
|
||||||
|
$runOnceKey = Get-RunOnceKey $Key;
|
||||||
|
Remove-Item $runOnceKey.PSPath;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Sets the user to login automatically on boot.
|
Sets the user to login automatically on boot.
|
||||||
|
|
Loading…
Reference in a new issue