|
1 | 1 | ## Frequently Asked Questions |
2 | 2 |
|
3 | | -**Issue** |
| 3 | +## Question 1 |
4 | 4 |
|
5 | 5 | ERROR: winget (App Installer) is not installed (Screenshot below). |
6 | 6 |
|
7 | 7 |  |
8 | 8 |
|
9 | | -**Solution** |
| 9 | +### Solution |
10 | 10 |
|
11 | | -1. Make sure if App Installer is properly configured in the `PATH` environment variable. Open the PowerShell and run `echo $env:PATH`. You should see something like `C:\Users\<yourname>\AppData\Local\Microsoft\WindowsApps`. |
12 | | -2. If you don't see the WindowsApp path, add it (in Powershell): `setx PATH $env:PATH;C:\Users\$env:USERNAME\AppData\Local\Microsoft\WindowsApps"`. |
13 | | -3. Restart the Powershell and run `winget --version`. |
14 | | -4. If you still see the issue the, download the installer for the latest version of App Installer from Microsoft website(https://learn.microsoft.com/en-us/windows/msix/app-installer/install-update-app-installer) and rerun the script. |
| 11 | +There are two common causes for this issue. Follow the steps for the scenario that matches your environment. |
15 | 12 |
|
16 | | -Since this is a Windows application you didn't require admin rights to run it. |
| 13 | +**Scenario 1:** App Installer missing or not on PATH |
| 14 | + |
| 15 | +1. Confirm that the App Installer (winget) is available on your PATH. In PowerShell run: |
| 16 | + |
| 17 | + ```powershell |
| 18 | + echo $env:PATH |
| 19 | + ``` |
| 20 | + |
| 21 | + You should see a path similar to: |
| 22 | + |
| 23 | + ```text |
| 24 | + C:\Users\<yourname>\AppData\Local\Microsoft\WindowsApps |
| 25 | + ``` |
| 26 | + |
| 27 | +2. If the WindowsApps path is missing, add it to your user PATH. In PowerShell run (note the quotes): |
| 28 | + |
| 29 | + ```powershell |
| 30 | + setx PATH "${env:PATH};C:\Users\$env:USERNAME\AppData\Local\Microsoft\WindowsApps" |
| 31 | + ``` |
| 32 | + |
| 33 | + After running `setx`, close and re-open PowerShell for the change to take effect. |
| 34 | + |
| 35 | +3. Verify winget is available: |
| 36 | + |
| 37 | + ```powershell |
| 38 | + winget --version |
| 39 | + ``` |
| 40 | + |
| 41 | +4. If winget is still not available, install or update the App Installer from Microsoft and then re-run the script: |
| 42 | + https://learn.microsoft.com/windows/package-manager/winget/ |
| 43 | + |
| 44 | +**Scenario 2:** Corporate-managed devices / Microsoft Managed Desktop |
| 45 | + |
| 46 | +On some corporate-managed devices the App Installer may only be available at the user profile level or may be restricted by IT policies. If you see the error in this environment: |
| 47 | + |
| 48 | +1. Run PowerShell as your normal user (not elevated) so the user-level App Installer can be discovered. |
| 49 | +2. When the script attempts to install applications, an elevation prompt or helpdesk intervention may be required. Have IT or helpdesk provide administrator credentials when prompted. |
| 50 | +3. In some environments each application install may require separate approval or credentials. If installations fail due to policy restrictions, contact your IT support team and request App Installer/winget be made available or for the required packages to be installed. |
| 51 | + |
| 52 | +Additional notes |
| 53 | + |
| 54 | +- After installing or updating the App Installer, restart PowerShell before re-running `setup_env` scripts so the updated PATH is picked up. |
| 55 | +- If you continue to have problems, capture the exact error output and the result of `echo $env:PATH` and open an issue (or provide the logs here) so we can help diagnose further. |
17 | 56 |
|
18 | 57 | --- |
19 | 58 |
|
| 59 | +## Question 2 |
| 60 | + |
| 61 | +How does a successful installation log looks like? |
| 62 | + |
| 63 | +### Log |
| 64 | + |
| 65 | +```powershell |
| 66 | +PS C:\Users\UserHomeDir> cd \github\dev-tools |
| 67 | +PS C:\github\dev-tools> .\scripts\windows\setup_env_min.ps1 |
| 68 | +===> Starting minimal Windows developer environment setup... |
| 69 | +===> setup_env_min.ps1 - Minimal Windows bootstrap |
| 70 | +===> Accepted switches: -DryRun (preview), -Interactive (installer UX), -Silent (no prompts), -Help (this message). |
| 71 | +===> Default behavior: Silent installs (no prompts). |
| 72 | +===> Mode: Silent (default). |
| 73 | +===> PATH (Session) entries (one per line): |
| 74 | + 01: C:\Program Files\Microsoft\jdk-17.0.18.8-hotspot\bin |
| 75 | + 02: C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin |
| 76 | + 03: C:\WINDOWS\system32 |
| 77 | + 04: C:\WINDOWS |
| 78 | + 05: C:\WINDOWS\System32\Wbem |
| 79 | + 06: C:\WINDOWS\System32\WindowsPowerShell\v1.0\ |
| 80 | + 07: C:\WINDOWS\System32\OpenSSH\ |
| 81 | + 08: C:\Program Files\dotnet\ |
| 82 | + 09: C:\Program Files (x86)\Microsoft SQL Server\160\DTS\Binn\ |
| 83 | + 10: C:\Users\UserHomeDir\AppData\Local\Microsoft\WindowsApps |
| 84 | + 11: C:\Users\UserHomeDir\AppData\Local\Programs\Microsoft VS Code\bin |
| 85 | + 12: C:\Users\UserHomeDir\AppData\Local\GitHubDesktop\bin |
| 86 | + 13: C:\Users\UserHomeDir\AppData\Local\Programs\Git\cmd |
| 87 | + 14: C:\Users\UserHomeDir\AppData\Local\Programs\Apache\apache-maven-3.9.11\bin |
| 88 | + 15: C:\Program Files\Microsoft\jdk-17.0.18.8-hotspot\bin |
| 89 | +===> PATH (Machine) entries (one per line): |
| 90 | + 01: C:\Program Files\Microsoft\jdk-17.0.18.8-hotspot\bin |
| 91 | + 02: C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin |
| 92 | + 03: C:\WINDOWS\system32 |
| 93 | + 04: C:\WINDOWS |
| 94 | + 05: C:\WINDOWS\System32\Wbem |
| 95 | + 06: C:\WINDOWS\System32\WindowsPowerShell\v1.0\ |
| 96 | + 07: C:\WINDOWS\System32\OpenSSH\ |
| 97 | + 08: C:\Program Files\dotnet\ |
| 98 | + 09: C:\Program Files (x86)\Microsoft SQL Server\160\DTS\Binn\ |
| 99 | +===> PATH (User) entries (one per line): |
| 100 | + 01: C:\Users\UserHomeDir\AppData\Local\Microsoft\WindowsApps |
| 101 | + 02: C:\Users\UserHomeDir\AppData\Local\Programs\Microsoft VS Code\bin |
| 102 | + 03: C:\Users\UserHomeDir\AppData\Local\GitHubDesktop\bin |
| 103 | + 04: C:\Users\UserHomeDir\AppData\Local\Programs\Git\cmd |
| 104 | + 05: C:\Users\UserHomeDir\AppData\Local\Programs\Apache\apache-maven-3.9.11\bin |
| 105 | + 06: C:\Program Files\Microsoft\jdk-17.0.18.8-hotspot\bin |
| 106 | +===> Updating winget sources... |
| 107 | +Updating all sources... |
| 108 | +Updating source: msstore... |
| 109 | +Done |
| 110 | +Updating source: winget... |
| 111 | + ██████████████████████████████ 100% |
| 112 | +Done |
| 113 | +Updating source: winget-font... |
| 114 | +Done |
| 115 | +===> Installing required tools... |
| 116 | +===> git already available. Skipping Git for Windows. |
| 117 | +===> java already available. Skipping JDK install. |
| 118 | +===> code already available. Skipping Visual Studio Code install. |
| 119 | +===> Installing: IntelliJ IDEA Community (JetBrains.IntelliJIDEA.Community)... |
| 120 | +Found an existing package already installed. Trying to upgrade the installed package... |
| 121 | +No available upgrade found. |
| 122 | +No newer package versions are available from the configured sources. |
| 123 | +
|
| 124 | +===> Already installed: IntelliJ IDEA Community - skipping. |
| 125 | +===> mvn already available. Skipping Maven install. |
| 126 | +===> Setting up JAVA_HOME... |
| 127 | +===> Found JDK at: C:\Program Files\Microsoft\jdk-17.0.18.8-hotspot |
| 128 | +===> JAVA_HOME set to: C:\Program Files\Microsoft\jdk-17.0.18.8-hotspot |
| 129 | +===> Restart your terminal to apply the JAVA_HOME change. |
| 130 | +===> PATH (Session) entries (one per line): |
| 131 | + 01: C:\Program Files\Microsoft\jdk-17.0.18.8-hotspot\bin |
| 132 | + 02: C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin |
| 133 | + 03: C:\WINDOWS\system32 |
| 134 | + 04: C:\WINDOWS |
| 135 | + 05: C:\WINDOWS\System32\Wbem |
| 136 | + 06: C:\WINDOWS\System32\WindowsPowerShell\v1.0\ |
| 137 | + 07: C:\WINDOWS\System32\OpenSSH\ |
| 138 | + 08: C:\Program Files\dotnet\ |
| 139 | + 09: C:\Program Files (x86)\Microsoft SQL Server\160\DTS\Binn\ |
| 140 | + 10: C:\Users\UserHomeDir\AppData\Local\Microsoft\WindowsApps |
| 141 | + 11: C:\Users\UserHomeDir\AppData\Local\Programs\Microsoft VS Code\bin |
| 142 | + 12: C:\Users\UserHomeDir\AppData\Local\GitHubDesktop\bin |
| 143 | + 13: C:\Users\UserHomeDir\AppData\Local\Programs\Git\cmd |
| 144 | + 14: C:\Users\UserHomeDir\AppData\Local\Programs\Apache\apache-maven-3.9.11\bin |
| 145 | + 15: C:\Program Files\Microsoft\jdk-17.0.18.8-hotspot\bin |
| 146 | +===> PATH (User) entries (one per line): |
| 147 | + 01: C:\Users\UserHomeDir\AppData\Local\Microsoft\WindowsApps |
| 148 | + 02: C:\Users\UserHomeDir\AppData\Local\Programs\Microsoft VS Code\bin |
| 149 | + 03: C:\Users\UserHomeDir\AppData\Local\GitHubDesktop\bin |
| 150 | + 04: C:\Users\UserHomeDir\AppData\Local\Programs\Git\cmd |
| 151 | + 05: C:\Users\UserHomeDir\AppData\Local\Programs\Apache\apache-maven-3.9.11\bin |
| 152 | + 06: C:\Program Files\Microsoft\jdk-17.0.18.8-hotspot\bin |
| 153 | +===> Start verification |
| 154 | +===> Verify Git... |
| 155 | +git version 2.53.0.windows.1 |
| 156 | +===> Verify Java... |
| 157 | +openjdk version "17.0.18" 2026-01-20 LTS |
| 158 | +OpenJDK Runtime Environment Microsoft-13106358 (build 17.0.18+8-LTS) |
| 159 | +OpenJDK 64-Bit Server VM Microsoft-13106358 (build 17.0.18+8-LTS, mixed mode, sharing) |
| 160 | +===> Verify Maven... |
| 161 | +Apache Maven 3.9.11 (3e54c93a704957b63ee3494413a2b544fd3d825b) |
| 162 | +Maven home: C:\Users\UserHomeDir\AppData\Local\Programs\Apache\apache-maven-3.9.11 |
| 163 | +Java version: 17.0.18, vendor: Microsoft, runtime: C:\Program Files\Microsoft\jdk-17.0.18.8-hotspot |
| 164 | +Default locale: en_US, platform encoding: Cp1252 |
| 165 | +OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows" |
| 166 | +===> Verify VS Code... |
| 167 | +1.109.5 |
| 168 | +072586267e68ece9a47aa43f8c108e0dcbf44622 |
| 169 | +x64 |
| 170 | +===> Verify IntelliJ IDEA... |
| 171 | +===> IntelliJ verification is manual. Launch it once to finish first-run setup. |
| 172 | +
|
| 173 | +
|
| 174 | +Awesome, all set! |
| 175 | +``` |
0 commit comments