But, sometimes, you may need to open the command prompt window inside a specific directory or within the currently opened folder path. And when you open CMD in the administrator mode, the default path is set to C:\Windows\System32. When you open a command prompt on your Windows 11 PC, it opens in the current user directory path (For instance, C:\Users\Rand>). Windows launches it in a new terminal (Windows Console by default), and presumably, WSL does some magic to say "if I'm the owner of the terminal, then set the icon and font".The Command Prompt (cmd) is a powerful command-line utility for performing various tasks on a Windows computer. When run with the start (CMD) or Start-Process (PowerShell) command, it starts a separate process in Windows (rather than as a subprocess of the current shell). It retains the current characteristics of the "owning" terminal (started by CMD or PowerShell) - Same app icon, same fonts, etc. It's the same as typing ipconfig.exe, for instance. When you run ubuntu.exe (or one of the other WSL app execution aliases) from the command-line, it is started in the current terminal. That's pretty much the only difference than I can find from running it from the command-line. This app runs WSL in the legacy Windows Console, and does a couple of additional things such as set the application icon and font. When you run Ubuntu from the Start Menu, it is, of course, running the Store app. You can disable this, but I'm assuming it's enabled. exe" that is designed to launch the Store app. You can see this by going to Manage app execution aliases in Windows Settings. And I'll assume that you don't still have the deprecated 16.04 version around.ubuntu1804.exe: If you installed the "versioned" "Ubuntu 18.04".ubuntu2004.exe: If you installed the "versioned" "Ubuntu 20.04" from the Store.Ubuntu.exe is the "App Execution Alias" for the "Ubuntu" app installed from the Microsoft Store, although it's possible that it could also be: If start isn't aliased under PowerShell, try: start-process ubuntu.exe You should be able to use the resulting output with the start (CMD) or Start-Process (PowerShell) a la: start-process shell:AppsFolder\36828agowa338.AlpineWSL_my43bytk1c4nr!alpinewslīut do, of course, check your actual output from the above Get-AppxPackage test above, since the Family name can change based on the Store release, I believe.įor me, this launched a separate Windows Console with Alpine, with the Alpine logo and title. Then we get the DisplayName and AppId properties by traversing the XMLDocument as PowerShell/.Net properties.Get-AppxPackageManifest returns the XML package manifest for the app.$_.PackageFamilyName: Should match the directory name in C:\Program Files\WindowsApps for most non-system packages.Get-AppxPackage: Enumerate the installed packages.I've searched quite a bit, and found this page that references start shell:AppsFolder\" I'd like to get that same application window when launched from the command-line. When I run Ubuntu 20.04 from the Start Menu, it launches in a window with the Ubuntu icon and the correct window title ("Ubuntu 20.04 LTS"). I'm struggling to launch the WSL "Ubuntu 20.04" Store App (or any Store App, really) from the command-line (e.g.
0 Comments
Leave a Reply. |