Skip to content

Instantly share code, notes, and snippets.

@vanzan01
Last active May 15, 2025 05:37
Show Gist options
  • Select an option

  • Save vanzan01/20433479d6792e2edf5758ecbeee2065 to your computer and use it in GitHub Desktop.

Select an option

Save vanzan01/20433479d6792e2edf5758ecbeee2065 to your computer and use it in GitHub Desktop.
Fixing Razer Game Manager logoff crashes on Windows 11 24H2 shutdown
# Fix-Razer.ps1 – grace first, force only if needed
$displayName = 'Razer Game Manager Service 3'
$exeName = 'GameManagerService3'
# --- 1 try a normal Stop-Service (graceful) -------------------------------
try {
$svc = Get-Service -DisplayName $displayName -ErrorAction Stop
if ($svc.Status -ne 'Stopped') {
Write-Verbose "Sending SERVICE_CONTROL_STOP to $displayName"
Stop-Service -Name $svc.Name -ErrorAction Stop -WarningAction SilentlyContinue
$svc.WaitForStatus('Stopped','00:00:05') # wait up to 5 s
}
} catch {
Write-Verbose "Graceful stop failed or timed-out: $_"
}
# --- 2 ensure the exe is really gone --------------------------------------
Get-Process -Name $exeName -ErrorAction SilentlyContinue |
Stop-Process -Force -ErrorAction SilentlyContinue
@pa-0
Copy link

pa-0 commented May 15, 2025

Thanks for sharing this write-up. I took the notes in your comments and added them into a README.md that I made part of the gist. That way if someone clones or forks it, they get your notes along with the script. (Comments don't travel with gists).

@vanzan01
Copy link
Author

thanks bro - hope your crashes are solved!

@pa-0
Copy link

pa-0 commented May 15, 2025

thanks, man

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment