-
Notifications
You must be signed in to change notification settings - Fork 1
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
No version
or --help
output from windows browsers
#7
Comments
Will have a look when I'm home. Where is the code that calls this? |
It's in |
Got it. Will look at it later. |
Firefox does pass the tests tho so it's not an issue as it works fine, I'm just not getting it to print to stdout in a |
Have you tried Powershell? |
Yeah same results as above in the issue (which where from cmd.exe shell). |
I don't know yet. I'll have a look at home. Do you have the latest Chrome? |
How can I test the version? 😀 But same results with both chrome and chromium, latest'ish (44 or so). Noticing that the executable behaves differently than on unix, on mac and linux the executable is blocking, killing it will kill the tab. On windows, it just returns immediately. |
You can check in Chrome -> About. That's weird, when I terminated amok, my chrome quitted. |
I know, just found it amusing in an issue about |
Yeah :D Alright so I'll have a look when I'm home. |
@caspervonb I got you covered bro.
But when there's a will, there's a way. The version number is stored in the registry in the uninstall information. So we can query it via the command line, as per the example in the above link:
However, this did not work for me. The reason being - the key does not exist. My immediate assumption was that in the 2 years since this idea was suggested, Google has released the 64bit version of Chrome, so, a registry scour was in order. Eventually I have found my target:
Which outputs:
Which you can parse with a regex to get the version number. To strike out all possible fail points, I suggest you check the original 32bit query on a 32bit Chrome installatation - and in your code, you could try one and if it fails, try the other. They are bound to succeed, because this information must be in the registry - unless someone is using Chrome in a hackish portable way, and I don't even know if that is even possible or something you should care about. |
All right that's a shame, was hoping of using --version as an agnostic way to identify the browser name and version without resolving to platform specific things like the registry. Think I'll revert to just using the basename of the default paths for matching the For |
Well, I'm happy I could help with something.. |
Rebased a little on master, I know I know but with 0 forks and 0 current branches its fine, really. Now if the executable name is the default one, it'll figure out the type but, there are failures which the commit was supposed to fix which is things like But, separate issue. Thanks for the digging @stereokai 😀 |
F***ing A man :) |
$ chrome.exe --version # no output, instead the browser is launched.
$ firefox --version # no output, no launch.
Which breaks the new behavior of
type
introduced in b7806a1The text was updated successfully, but these errors were encountered: