我试图让它工作,但显然 Windows 不喜欢它。一旦它到达我的批处理文件的这一部分,.bat 就会关闭。
if %UserName% = Semedar (
if %UserName% 1394677 (
set administrator=true
)
)
if %administrator% == "true" (
echo This shows up for the admin
) Else (
echo otherwise if %UserName% doesn't equal "Semedar" or "1394677" this shows up.
)