Windows 7 DOS错误:";在这个时候是出人意料的。”;?
我的Windows 7系统路径如下所示:Windows 7 DOS错误:";在这个时候是出人意料的。”;?,windows-7,batch-file,Windows 7,Batch File,我的Windows 7系统路径如下所示: Path=C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;.... \NVIDIA was unexpected at this time. 我正在尝试根据是否已定义用户变量来设置新的用户变量: IF NOT DEFINED DEFAULTP ( echo Setting DEFAULTP to backup the system PATH
Path=C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;....
\NVIDIA was unexpected at this time.
我正在尝试根据是否已定义用户变量来设置新的用户变量:
IF NOT DEFINED DEFAULTP (
echo Setting DEFAULTP to backup the system PATH
SETX DEFAULTP=%PATH%
)
当我尝试执行此操作时,会出现如下错误:
Path=C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;....
\NVIDIA was unexpected at this time.
有人能猜出原因吗?试试这个:
IF NOT DEFINED DEFAULTP (
echo Setting DEFAULTP to backup the system PATH
SETX DEFAULTP "%PATH%"
)
编辑:运行setx/?
给出以下示例:
示例:SETX机器康柏
SETX机器“康柏电脑”/M
SETX MYPATH“%PATH%”
SETX MYPATH~路径~ 试试这个:
IF NOT DEFINED DEFAULTP (
echo Setting DEFAULTP to backup the system PATH
SETX DEFAULTP "%PATH%"
)
编辑:运行setx/?
给出以下示例:
示例:SETX机器康柏
SETX机器“康柏电脑”/M
SETX MYPATH“%PATH%”
SETX MYPATH~路径~
真不敢相信我错过了。我想我假设它像“SET”命令一样工作。真不敢相信我错过了。我想我假设它像“SET”命令一样工作。