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

Get full path to executable #16

Closed
ahallicks opened this issue Oct 6, 2017 · 4 comments
Closed

Get full path to executable #16

ahallicks opened this issue Oct 6, 2017 · 4 comments

Comments

@ahallicks
Copy link
Contributor

Would it be possible to return the full path to the executable of the currently active application? I'd like to be able to get the icon of the app and don't know of a good way to do this based solely on having the name of the exe.

@sindresorhus
Copy link
Owner

On macOS, it should be pretty simple, but I have no idea with Windows. Pull request welcome.

@ahallicks
Copy link
Contributor Author

Looking at the code (for Windows at least) would it not just be a case of breaking the following line out:
https://github.com/sindresorhus/active-win/blob/master/lib/windows.js#L77

And storing the next line as a separate var? That way, by the looks of it, you'd have the path and then the basename of the executable.

I'm no expert at this though so may be talking rubbish!

@sindresorhus
Copy link
Owner

This is implemented for macOS and Windows. The Linux implementation is missing though: #23

@sindresorhus
Copy link
Owner

Closing in favor of #23

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

No branches or pull requests

2 participants