|Google Chrome doesn't handle .url files unless it's set as the default browser. I don't want to set it as the default browser but I still want the option to open .url files with Chrome using a batch+registry command.|
I made this batch file to search each line a .url until it finds the URL= string and then launch chrome with the address on that line. It works for some .url files and doesn't for others. The problem is all .url files are not alike. Some have 2 lines some have 4 lines some have 12 lines. The batch files doesn't seem to be going through all of the lines. The script doesn't work right or it isn't nested properly.
(FOR /L %%i IN (1,1,9) DO SET /P url=) < %1
If /I %url:~0,4%=URL START %LOCALAPPDATA%\Google\Chrome\Application\chrome.exe --new-tab-page-1 "%url:~4%"
Line 1-9 is usually where the URL= address is so I used that as the range.
Some help would be appreciated.