灵符lingfu
F

fu.ling-lang.org

↓ 0 downloads

ทะเบียนแพ็กเกจ fu.ling-lang.org — เขียนด้วยภาษา Ling (ไทย) ทั้งหมด

Keywords registry, packages, web, ling, thai
lingfu install fu.ling-lang.org
LicenseApache-2.0 OR MIT
Authorsลิงลิน
READMECode / FilesVersionsDependency GraphDependentsSecurityBuildsSettings

Code / Files (22)

uninstall-service.ps1
# uninstall-service.ps1 — stop and remove the fu.ling-lang.org service.
# Self-elevates (UAC) if needed.

$ErrorActionPreference = 'Stop'
$TaskName = 'fu.ling-lang.org'

$admin = ([Security.Principal.WindowsPrincipal] `
    [Security.Principal.WindowsIdentity]::GetCurrent()
).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)
if (-not $admin) {
    Start-Process powershell.exe -Verb RunAs `
        -ArgumentList ('-NoProfile -ExecutionPolicy Bypass -File "' + $PSCommandPath + '"')
    return
}

Stop-ScheduledTask -TaskName $TaskName -ErrorAction SilentlyContinue
Unregister-ScheduledTask -TaskName $TaskName -Confirm:$false -ErrorAction SilentlyContinue
Get-Process ling -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue
Write-Host "Service '$TaskName' stopped and removed."

← Back to index