настроить путь в azure веб-задания

Я пытаюсь сделать следующее:

setx /M PATH "%PATH%;D:\home\python364x86\Lib\site-packages"

Но я получаю следующее:

ОШИБКА: Отказано в доступе к пути реестра.

Как я могу это решить?


person Andres Ruiz    schedule 29.07.2020    source источник


Ответы (1)


Изменить PATH непросто, но возможно.

Вы можете использовать код, как показано ниже:

<?xml version="1.0"?> 
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> 
  <system.webServer> 
    <runtime xdt:Transform="InsertIfMissing">
      <environmentVariables xdt:Transform="InsertIfMissing">
        <add name="FOO" value="BAR" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing" />    
        <add name="PATH" value="%PATH%;%HOME%\FolderOnPath" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing" />    
      </environmentVariables>
    </runtime> 
  </system.webServer> 
</configuration> 

Для получения более подробной информации вы можете обратиться к этой статье.

person Joey Cai    schedule 30.07.2020