Batch process bat variable reassignment

@echo off
call Signature.exe "C:\Test.dll"
SETLOCAL ENABLEDELAYEDEXPANSION
set "nResult="
if %errorlevel% == 1024 (
	set "nResult=1024"
) else (
	set "nResult=2048"
)
@echo %nResult%
pause

Variables need to add double quotes to solve the problem

Guess you like

Origin blog.csdn.net/what951006/article/details/82842928