Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] cannot launch Notepads from the command line #743

Closed
eksortso opened this issue Jan 4, 2021 · 7 comments
Closed

[Bug] cannot launch Notepads from the command line #743

eksortso opened this issue Jan 4, 2021 · 7 comments

Comments

@eksortso
Copy link

eksortso commented Jan 4, 2021

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!

@eksortso
Copy link
Author

eksortso commented Jan 4, 2021

There is a temporary workaround. Using Process Explorer, I found the executable. The folder "C:\Program Files\WindowsApps" cannot be accessed via Windows Explorer, but the specific path folder containing Notepads.exe can be accessed.

I can run "C:\Program Files\WindowsApps\19282JackieLiu.Notepads-Beta_1.4.2.0_x64__echhpq9pdbte8\Notepads.exe". Of course that isn't a permanent solution. But it'll work until the app is upgraded.

@soumyamahunt
Copy link
Contributor

The app execution alias for Notepads might have been disabled, you can enable it by going into settings.

@0x7c13
Copy link
Owner

0x7c13 commented Feb 9, 2021

image

@0x7c13 0x7c13 closed this as completed Feb 9, 2021
@eksortso
Copy link
Author

eksortso commented Feb 9, 2021

This is still not working. I switched the alias off and back on again, opened up a fresh new PowerShell, and tried both "notepads" and "notepads.exe". Neither works.
image

@soumyamahunt
Copy link
Contributor

@eksortso Do you have Notepads.exe in AppData\Local\Microsoft\WindowsApps folder inside your user directory. The complete path looks like this:
C:\Users\%your-user-name%\AppData\Local\Microsoft\WindowsApps.

Also, ensure that the above path is present in your user environment Path variable:

Screenshot 2021-02-10 121915

@eksortso
Copy link
Author

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.

@soumyamahunt
Copy link
Contributor

soumyamahunt commented Feb 11, 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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants