Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows 7 DOS错误:";在这个时候是出人意料的。”;?_Windows 7_Batch File - Fatal编程技术网

Windows 7 DOS错误:";在这个时候是出人意料的。”;?

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

我的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
  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”命令一样工作。