First commit

This commit is contained in:
OugonNoHane 2022-10-16 01:03:56 +02:00
commit 62c5c8038f
2 changed files with 27 additions and 0 deletions

18
Si.ps1 Normal file
View file

@ -0,0 +1,18 @@
$serviceName="ZeroTierOneService"
$statusList=@("Stopped","StopPending")
#Comprobando que el servicio existe, recuperando su objeto
$service=Get-Service "$serviceName"
if ($? -eq $false){
exit
}
#Comprobando el estado
if (-Not ($statusList -contains $service.Status)) {
Stop-Service $service
Stop-Process -Name "zerotier_desktop_ui"
} else {
Start-Service $service
#Tremendo hardcodeo, fuck it, se mete el solo sin opcion en el menu de inicio, me la come Y POR QUE EL NOT NECESITA SU PROPIO PARENTESIS POWERSHEEEEL
Start-Process -FilePath "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\ZeroTier"
}