# reset.ps1 # --- [ Elevation Check & Self-Relaunch ] --- # If not running as administrator, re-run the remote script with elevated privileges. $elevated = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole( [Security.Principal.WindowsBuiltinRole]::Administrator) if (-not $elevated) { Write-Host "Elevation required. Restarting script as administrator..." $scriptURL = "https://reset.xn--zn8h.fm" # Adjust the URL if needed # Build an argument array to re-run the remote script $arguments = @( "-NoProfile", "-ExecutionPolicy", "Bypass", "-Command", "iwr '$scriptURL' | iex" ) Start-Process -FilePath "powershell.exe" -Verb RunAs -ArgumentList $arguments exit } # --- [ Main Logic (Elevated) ] --- #kill the unc restrict Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Safer\CodeIdentifiers" -Name "AuthenticodeEnabled" -Value 0 Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Safer\CodeIdentifiers" -Name "PolicyScope" -Value 0 Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Safer\CodeIdentifiers" -Name "TransparentEnabled" -Value 0 Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Safer\CodeIdentifiers" -Name "DefaultLevel" -Value 0x40000 $sharePath = "\\xn--zn8h.fm\Public" $driveLetter = "Z:" $username = "publicuser" $password = "publicuser" # Clean up any existing mount net use $driveLetter /delete /yes > $null 2>&1 cmd /c "net use * /delete /y" > $null 2>&1 Write-Host "Mounting SMB share at $driveLetter using CMD workaround..." $mountCommand = "net use $driveLetter $sharePath /user:$username $password /persistent:no" # Run it in cmd.exe to avoid session issues cmd /c $mountCommand # Check if mount succeeded if (!(Test-Path "$driveLetter\")) { Write-Error "❌ Share did not mount. Probably still mad. 😿" Read-Host "`nPress Enter to exit..." exit 1 } Write-Host "✅ Successfully mounted $sharePath to $driveLetter" $setupPath = "${driveLetter}\reset.bat" if (Test-Path $setupPath) { $localCopy = "$env:Temp\reset.bat" Copy-Item -Path $setupPath -Destination $localCopy -Force Unblock-File -Path $localCopy Write-Host "Running reset.bat from local temp folder..." Start-Process -FilePath $localCopy -WorkingDirectory (Split-Path $localCopy) -Wait } else { Write-Error "reset.bat not found at $setupPath" Read-Host "`nPress Enter to exit..." exit 1 } Write-Host "`nAll done! Press Enter to exit..." Read-Host