Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
Script:
# Este script altera o registro do Windows para mostrar os segundos no relógio da barra de tarefas
# Caminho do registro onde a configuração do relógio está localizada
$registryPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
# Nome da chave que será alterada
$registryKey = "ShowSecondsInSystemClock"
# Verifica se a chave já existe
if (-Not (Test-Path "$registryPath\$registryKey")) {
# Cria a chave e define o valor para 1 (habilitar segundos)
New-ItemProperty -Path $registryPath -Name $registryKey -Value 1 -PropertyType DWORD -Force
Write-Host "Chave de registro criada e segundos habilitados no relógio."
} else {
# Altera o valor da chave existente para 1
Set-ItemProperty -Path $registryPath -Name $registryKey -Value 1
Write-Host "Segundos habilitados no relógio."
}
# Reinicia o Explorer para aplicar as mudanças
Stop-Process -Name explorer -Force
Start-Process explorer
Write-Host "O Explorer foi reiniciado. O relógio da barra de tarefas agora mostra os segundos."
Como Executar o Script:
.ps1
, por exemplo, MostrarSegundosRelogio.ps1
.cd
. Por exemplo:
cd C:\Caminho\Para\O\Script
.\MostrarSegundosRelogio.ps1