Unified-Hosts-AutoUpdate
Unified-Hosts-AutoUpdate copied to clipboard
The system cannot find the batch label specified - Compress
What I did was change compression from 5 to 9 and the I got this (error) message:
Script updates currently disabled
Initializing...
The Unified Hosts is already installed in your local hosts file
Checking for Unified Hosts updates...
Downloaded benchmark successfully
Your current ignore list, custom list, or compression level needs to be applied.
Updating the hosts file...
!!! =-> The system cannot find the batch label specified - Compress <-= !!!
I guess somehow :Compress isn't yet available in the script yet?
I guess somehow :Compress isn't yet available in the script yet?
It's been available in the script for at least 5 years.
https://github.com/ScriptTiger/Unified-Hosts-AutoUpdate/blame/0688062fb8fcc3ad152ed09405131727533fe5a5/Hosts_Update.cmd#L561
!!! =-> The system cannot find the batch label specified - Compress <-= !!!
This is not an error from the default Windows command-line interpreter (cmd.exe). I'm not sure what interpreter you're using, but this script intentionally only targets the cmd.exe. If you are using PowerShell or something else, it's not guaranteed to work.
I just execute it like usual (in Win11 23H2), with 'available' I mean in the right order in the script, so when it's called it's not defined yet perhaps? Somehow I'm getting this just by starting the script with different compression now.
...when it's called it's not defined yet perhaps?
Labels, such as those that "call" and "goto" use, are static symbols for the position in the file at which they are located and do not need to be defined in any particular order. This is not the case for things like variables, which can, as the name implies, vary over time and order would, in fact, matter.
That being said, I can't personally support Windows 11. However, if anyone else here can debug it for Windows 11 without breaking anything for previous versions, I am open to PRs.