Alterar esquema de som no windows via register

0

Como posso alterar o esquema de som para "sem som" para o usuário existente editando o registro? Eu estou fazendo um arquivo .reg com todos os ajustes que eu preciso em janelas recém-instaladas, mas eu estou preso com a mudança de esquema de som.

    
por Bearded Beaver 05.03.2018 / 09:08

1 resposta

0

Acabei de criar este script. Use por sua conta e risco;

if (-Not (Test-Path 'HKCU:\AppEvents\Schemes\Names\.None'))
{ 
    New-Item -Path 'HKCU:\AppEvents\Schemes\Names' -Name '.None'
    New-ItemProperty -Path 'HKCU:\AppEvents\Schemes\Names\.None' -Name '(Default)' -Type 'String' -Value 'No Sounds'
}

Get-ChildItem -Path 'HKCU:\AppEvents\Schemes\Apps\.Default' | Select Name | ForEach-Object {
    $thing = $_.Name -replace "HKEY_CURRENT_USER", "HKCU:"
    $fullnun = "$thing\.None"
    if (-Not (Test-Path $thing))
    {
        New-Item -Path $thing -Name '.None'
        echo "$thing\.None created"
    } else {
        echo "$thing\.None already existed"
    }

    if (Test-Path($fullnun))
    {
        New-ItemProperty -Path $fullnun -Name '(Default)' -Type 'String' -Value ''
    }
}

Set-ItemProperty -Path 'hkcu:\AppEvents\Schemes' -Name "(Default)" -Type "String" -Value ".None"
    
por 03.05.2018 / 03:28