Skip to content

Instantly share code, notes, and snippets.

@keckelt
Created February 24, 2025 19:56
Show Gist options
  • Save keckelt/1234059fe7121a05e5bb20529d53ed2b to your computer and use it in GitHub Desktop.
Save keckelt/1234059fe7121a05e5bb20529d53ed2b to your computer and use it in GitHub Desktop.
Restart Flameshot

Restart script for Flameshot

Launch from start menu by creating a shortcut to the script and set its target to:

powershell.exe -ExecutionPolicy Bypass -File "C:\path\to\script.ps1"
# Define the process name
$processName = "flameshot"
# Stop the process if it's running
Get-Process -Name $processName -ErrorAction SilentlyContinue | Stop-Process -Force
# Wait for a moment to ensure the process has stopped
Start-Sleep -Seconds 2
# Start the process again
Start-Process -FilePath "c:\Program Files\Flameshot\bin\flameshot.exe"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment