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"
}

9
zerotoggle.bat Normal file
View file

@ -0,0 +1,9 @@
@ECHO off
set "params=%*"
rem d drive p path n name ~t timestamp ~z size ~a atribs ~x extension ~s shortpaths FOR /? sustraccion implicita de n del arg 0
:es increible que taL CHAPUZA SEA COMO TODO EL MUNDO ELEVA DESDE CMD USANDO UAC AAAAAAAAAAA hfs colega que el echo se muestra la linea donde se desactiva que onda
cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" ) && fsutil dirty query %systemdrive% 1>nul 2>nul || ( echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/c cd ""%~sdp0"" && %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && del "%temp%\getadmin.vbs" && exit /B )
start powershell -command "& '.\Si.ps1'"
ECHO on