Here is what I have a W7 64 bit Pro Visual Studio 2019
I have Google and Firefox installed as the default Browser
DuckDuckGo default Search Engine
I have a VB.Net app that stores the web address in a SQLite DB
Click on the link in a Data Grid View & it opens the YouTube site
with this cmd
Process.Start(webPAGE)
Some are formatted this way
"https://www.youtube.com/@KRWoodworks/videos"
Others this way
"https://www.youtube.com/user/DrunkenWoodworker/videos"
What I would like to do is add code to the Best Links VB.Net
app that lets me set the default Browser and when the Best Links
app closes sets it back to Firefox
OR a stand alone app in VB.Net or C# that lets me set the default browser
OR a BATCH file that lets me set the default Browser
this would require knowledge of how to write a BATCH File
I understand the basics of this but have NO Experience
and do not like to mess with the Registry
When I say Default Browser it has to be Google Chrome because
Google is not loading YouTube video's because it finds Firefox
If a BATCH file is the only option can I run a BATCH file from
a VB.Net app ?
What I have tried:
I have looked at a number of post's about this concept
One said Process.Start(webPAGE) is a bad idea ?
When I wrote the Best Links app I grabbed the first line of code that worked
I looked at this not exactly what I want
Chocolatey Software | SetDefaultBrowser 1.5.0[
^]
This looks GOOD but I do not understand all the code and we
are talking a 12 yr old post sure my OS is that Old ha ha
https://superuser.com/questions/368814/how-do-i-change-my-default-browser-to-an-unlisted-program-in-windows-7[
^]
IMPROVED question
OK I am able to open the Browser with this code
Process.Start(webPAGE)
Dim browser As String
browser = "http://www.google.com/"
Process.Start(browser)
This creates a issue that the Browser gets opened every time
I load a new video from a YouTube channel
So I need a if statement that determines if the Browser is open
I am working on that