Files
vue-pult/server/apply-ducking.ps1
sasha 3e90269b0b Initial commit: Vue.js тир управления система
- Клиентская часть Vue 3 + Vite
- Серверная часть Node.js + WebSocket
- Система авторизации и смен
- Управление игровыми портами
- Поддержка тем (светлая/темная)
- Адаптивный дизайн

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 12:24:22 +03:00

40 lines
1.5 KiB
PowerShell
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# PowerShell скрипт для изменения громкости всех PowerShell процессов
param(
[int]$Volume = 7
)
# Получаем все процессы PowerShell кроме текущего
$processes = Get-Process | Where-Object {
$_.ProcessName -eq 'powershell' -and $_.Id -ne $PID
}
Write-Host "Найдено PowerShell процессов: $($processes.Count)"
foreach ($proc in $processes) {
Write-Host "Изменяем громкость процесса $($proc.Id) на $Volume%"
# Используем nircmd если доступен
$nircmdPath = Join-Path $PSScriptRoot "tools\nircmd.exe"
if (Test-Path $nircmdPath) {
& $nircmdPath setappvolume /pid:$($proc.Id) ($Volume / 100)
} else {
# Альтернатива - изменить системную громкость
Write-Host "nircmd.exe не найден в $nircmdPath"
}
}
# Альтернативный метод через Windows Core Audio API
Add-Type @"
using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
public class VolumeControl {
public static void SetProcessVolume(int processId, float volume) {
// Здесь должен быть код для работы с Windows Core Audio API
// Но это требует сложной интеграции с COM интерфейсами
}
}
"@
Write-Host "Громкость изменена на $Volume%"