Skip to content

Commit 0094d54

Browse files
authored
Merge pull request #46828 from kgremban/jul17-env
Reinstate removed path fix
2 parents f613eb4 + 1740f1a commit 0094d54

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

articles/iot-edge/quickstart.experimental.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,15 @@ The instructions in this section configure the IoT Edge runtime with Linux conta
8181

8282
2. Download the IoT Edge service package.
8383

84-
```powershell
85-
Invoke-WebRequest https://aka.ms/iotedged-windows-latest -o .\iotedged-windows.zip
86-
Expand-Archive .\iotedged-windows.zip C:\ProgramData\iotedge -f
87-
Move-Item c:\ProgramData\iotedge\iotedged-windows\* C:\ProgramData\iotedge\ -Force
88-
rmdir C:\ProgramData\iotedge\iotedged-windows
89-
$env:Path += ";C:\ProgramData\iotedge"
90-
SETX /M PATH "$env:Path"
91-
```
84+
```powershell
85+
Invoke-WebRequest https://aka.ms/iotedged-windows-latest -o .\iotedged-windows.zip
86+
Expand-Archive .\iotedged-windows.zip C:\ProgramData\iotedge -f
87+
Move-Item c:\ProgramData\iotedge\iotedged-windows\* C:\ProgramData\iotedge\ -Force
88+
rmdir C:\ProgramData\iotedge\iotedged-windows
89+
$sysenv = "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
90+
$path = (Get-ItemProperty -Path $sysenv -Name Path).Path + ";C:\ProgramData\iotedge"
91+
Set-ItemProperty -Path $sysenv -Name Path -Value $path
92+
```
9293

9394
3. Install the vcruntime.
9495

0 commit comments

Comments
 (0)