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

Console and shell won't launch with bat or vbs associated with non-default #2

Open
keeganwitt opened this issue Apr 12, 2020 · 2 comments

Comments

@keeganwitt
Copy link
Member

keeganwitt commented Apr 12, 2020

If you have a non-default association with the .bat extension (for example, Notepad++), the console and shell shortcuts won't launch. This can be checked with

>assoc .bat
.bat=Notepad++_file
>assoc .vbs
.vbs=Notepad++_file

This can be fixed with (requires cmd to be run as administrator)

assoc .bat=batfile
assoc .vbs=VBSFile

The .cmd extension (also a batfile) doesn't cause any issues with launching console/shell, but is another one to be aware of.

@keeganwitt keeganwitt changed the title Console and shell won't launch with bat file associated with non-default Console and shell won't launch with bat or vbs associated with non-default Apr 12, 2020
@keeganwitt
Copy link
Member Author

keeganwitt commented Jul 3, 2020

Still trying to figure out the best solution for this. So far the only options I've come up with are

  1. Bring back in the native launcher.
  2. Let the console window open, but make it minimized in the shortcut (this would fix the vbs issue, but not the same issue with bat, though I'd think that association is less likely to be messed with).

Some of the concerns I had with the native launcher was that it had knowledge of valid parameters (which would need to be updated, as they change in different Groovy versions), and it has logic about locating the Java executable, that I'd prefer be handled by something else, rather than having to maintain that logic.

I'd considered Launch4J, which would abstract the Java executable location stuff for me, but it doesn't support variable expansion, and so I don't know of a way to specify the path to the Groovy jars that get installed without hard-coding it.

@keeganwitt
Copy link
Member Author

Another option I just found is https://github.com/palantir/go-java-launcher. But from a brief reading, I think it will have similar challenges as Launch4J in that the configuration is pretty static.

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

1 participant