Skip to content

Commit 0c35e49

Browse files
committed
Elevate pwsl for setting 7zip path
1 parent 1c36922 commit 0c35e49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/setup_utilities/host_tools.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export async function installWindowsHostTools(context: vscode.ExtensionContext,
4040
//Step 2
4141
// If winget is installed then we can install the required dependencies with this one liner;
4242

43-
let result = await executeTaskHelper("Install Host Tools", "winget install Kitware.CMake Ninja-build.Ninja oss-winget.gperf python Git.Git oss-winget.dtc wget 7zip.7zip; [System.Environment]::SetEnvironmentVariable('Path', [System.Environment]::GetEnvironmentVariable('Path', 'Machine') + ';C:\\Program Files\\7-Zip', 'Machine')", "");
43+
let result = await executeTaskHelper("Install Host Tools", "winget install Kitware.CMake Ninja-build.Ninja oss-winget.gperf python Git.Git oss-winget.dtc wget 7zip.7zip; Start-Process powershell -Verb RunAs -ArgumentList \"[System.Environment]::SetEnvironmentVariable('Path', [System.Environment]::GetEnvironmentVariable('Path', 'Machine') + ';C:\\Program Files\\7-Zip', 'Machine')\"", "");
4444

4545
return result;
4646
}

0 commit comments

Comments
 (0)