Copy-Item -Path $PSScriptRoot\Managetaskbar -Destination $env:ALLUSERSPROFILE'\Managetaskbar' -Recurse -Force chcp 1251 Foreach ($UserDir in Get-ChildItem -Directory -Attributes D, H "C:\Users\") { $UserName = $UserDir.ToString() if (($username -ne "Public") -and ($username -ne "Default User") -and ($username -ne "All Users") -and ($username -ne "Все пользователи")) { $DatDir = $UserDir.get_FullName() + "\NTUSER.DAT" Write-Host $DatDir reg load HKLM\TEMP $DatDir reg add HKLM\TEMP\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /v SetTaskBar /t REG_SZ /d "Powershell.exe -NoProfile -ExecutionPolicy ByPass -WindowStyle Hidden -file C:\\ProgramData\\Managetaskbar\\Taskband.ps1" /f reg unload HKLM\TEMP } }