-3

我正在寻求帮助。
我希望在我的桌面上的本地 GPO 上创建一个本地登录脚本。
我需要做的是,当任何用户登录时,此脚本将触发并检查当前登录的用户,如果它不是我的帐户,那么它将注销。

就像是:

IF NOT %username% = Domain\me shutdown.exe -l

也接受任何其他解决方案。

4

1 回答 1

0

你在看什么HELP IF

语法应如下所示:

@echo off

rem add your username here after the = without space.
set "_MyUsername=MyUsername"

if [%username%] neq [%_MyUsername%] shutdown.exe /l /f || exit /b 0
于 2015-09-27T21:56:03.223 回答