I'm creating a .bat script that sets a variable using setx based on dynamic content. I would like to echo back to the user what the new value has been set to. I know from the documentation (https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/setx) that the variable is not available in the current window but will be available in newly opened windows. Is there any way to confirm what the value has been set to and echo it back to the user (without opening a new window)?
Example is shown below.


setx, on the next line, just addset "fou=This is Foo"