question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] cannot launch Notepads from the command line

See original GitHub issue

Describe the bug The readme states:

  • Launch from the command line or PowerShell by typing: notepads or notepads %FilePath%.

However, I cannot use notepads to launch the app from the command line or PowerShell or from the Run window. If I try, I get an error message saying that Notepads can’t be found.

To Reproduce

You may want to try each option. Every option gives me the same error.

  • Install Notepads (either through the Microsoft Store or from the .msixbundle on the Releases page
  • Open cmd, or open PowerShell, or press Win+R.
  • Type notepads and press Enter.

Expected behavior

The Notepads app ought to launch and take focus. If it’s already open, it ought to appear on top and take focus.

Screenshot image

Desktop (please complete the following information):

  • Windows 10 1909 18363.1256
  • Notepads v1.4.2.0

Additional context

The ability to launch the app and open files from the command line is important to me because I want to bind the app to a keyboard shortcut, and the first 10 apps on my task bar cannot be displaced. I’m impressed by Notepads so far and would like to use it, but this lack of command-line support is a potential deal-breaker. Please help!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
soumyamahuntcommented, Mar 14, 2021

The app was installed through the Microsoft Store, and the path was different from what you provided. It was put in a subfolder of C:\Program Files\WindowsApps, as noted previously.

The app will be installed in that folder regardless of which installation method you use. The path I provided is where Windows creates a proxy .exe file for apps you have enabled App Execution Alias, if you disable Execution Alias, then the .exe will be deleted. This is how modern apps can be enabled/disabled by users from launching from command line instead of the old days when you have to modify path variable repeatedly. The issue in your end was the path where Windows creates execution alias wasn’t in Path variable. (by default it is, so I don’t know what happened at your end. Either you directly modified the variable and removed it or some program you used did that.)

1reaction
eksortsocommented, Feb 10, 2021

I have success to report, but here are a few notes.

The app was installed through the Microsoft Store, and the path was different from what you provided. It was put in a subfolder of C:\Program Files\WindowsApps, as noted previously.

But, I did get the notepads to work in PowerShell. I added C:\Users\dave.ostroske\AppData\Local\Microsoft\WindowsApps in my user variable Path. After that, I could launch Notepads from ps, cmd, and Win+R successfully.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to open Notepad using Command Prompt commands
Press Windows + X keys and click command prompt(admin). · Type “sfc /scannow” and press Enter. · After the scan is complete, type...
Read more >
7 Ways to Fix Notepad Not Opening on Windows
If that doesn't work, try opening Notepad through a command-line tool. Open the search menu to launch Command Prompt or PowerShell.
Read more >
Can't launch Notepad from the 'Run' prompt : r/techsupport
I'm running Windows 11 22H2, I can launch Notepad from the start menu fine, or by double-clicking notepad.exe it in the C:\Windows folder,...
Read more >
How to fix can't launch Notepad.exe in Windows? - ugetfix.com
1. Alter the registry · 2. Change the location of Program Files · 3. Turn off Firewall · 4. Create a new user...
Read more >
Notepad Is Not Opening in Windows 10 FIX - YouTube
Notepad Is Not Opening in Windows 10 FIX. Command Used: Dism /Online /Add-Capability /CapabilityName:Microsoft.Windows. Notepad ~~~~0.0.1.0 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found