Open .webloc
files (macOS URL shortcut files) in Microsoft Windows in default browser.
Simple middleware app that parses .webloc
file (macOS URL shortcut file) and passes found URL to a system call that opens the URL in default web browser.
- Go to this repo releases tab or follow this link to download latest
WindowsWeblocOpener-<version>.zip
. - Unzip the release.
- Copy
WindowsWeblocOpener
directory containingWindowsWeblocOpener.exe
somewhere, sayC:\Program Files\WindowsWeblocOpener\WindowsWeblocOpener.exe
. - Right click
.webloc
file and choose Open With / Choose another app. - In the opened dialog window check Always use this app to open .webloc files.
- In the app selection list click More apps and scroll down for Look for another app on this PC.
- Navigate to WindowsWeblocOpener.exe and select it.
- Profit.
Tested on
- Windows 10 x64
- Webloc files created by Safari on macOS
- Webloc files created by Chrome on macOS
- Webloc files created by Firefox on macOS
Interweb tells that the current format for weblocs was introduced in Mac OS X 10.4.
Get rid of console window that appears for a split of a second.
Does that mean rewriting this to WinMain
routine (meaning C++?) and building w/ /link /subsystem:windows /entry:mainCRTStartup
?
App was built using CL (Compiler Command-Line Syntax) through Developer Command Prompt on a MSW10 machine that has Visual Studio Community 2017 on it.
Directory testfiles
have .webloc
files as created by different browsers on macOS in it.
Open Developer Command Prompt
Create directory X:\Path\To\Source\Of\WindowsWeblocOpener\build\prod
as cl
does not like to put products under non existing dirs.
cd X:\Path\To\Source\Of\WindowsWeblocOpener\src
cl main.c /Fe..\build\prod\WindowsWeblocOpener /DDEBUG=0
Open Developer Command Prompt
cd X:\Path\To\Source\Of\WindowsWeblocOpener\src
cl main.c /FeWindowsWeblocOpener
WindowsWeblocOpener.exe X:\Path\To\Source\Of\WindowsWeblocOpener\testfiles\safari.webloc