I am currently working with a classic ASP web application. What I'm wondering about is how it knows which browser to launch, I've looked over everything and am unable to find anywhere that it says to Launch Firefox in order to open the application. If i have firefox uninstalled, then it launches Chrome, however, when I hvae both Chrome and Firefox, then Firefox launched even if I have Chrome set as my default browser. Anyone have an idea?
your asp code has no connection whatsoever with what browser is used, it's browser independent. in order for you web app to run, you must open a browser FIRST, then go to the url of your web app, which will then fire off the asp code. It would be a huge security issue if i went to a web site, and it decided to open a different browser on my computer!
if you want to set Chrome as your default browser, follow these instructions:
https://support.google.com/chrome/answer/95417?co=GENIE.Platform%3DDesktop&hl=en
for firefox - https://support.mozilla.org/en-US/kb/how-change-your-default-browser-windows-10
for IE - https://support.microsoft.com/en-us/help/17435/windows-internet-explorer-make-default-browser
Your default browser is a different setting than the "open this file type with this program" setting. If double-clicking an .asp file opens in Firefox, then that's the latter type of setting.
To change it, right-click an .asp file, choose the "Open with >" option, then "Choose default program...".
That all said, 99.999% of users will never have occasion to double-click an .asp file, because most of us don't use web servers as our normal everyday computers.
Related
Context: I have three web browsers installed on my Windows 10 computer which are Chrome, Firefox, and Opera.
Problem: Whichever browser I newly open, they all start with this website:http://007eecfcfedlkh.jumpkj.chuairan.com/index.html
How it happened: I clicked a link on a website yesterday and it automatically downloaded several applications and automatically installed themselves without showing any instructions to install them.
Thing I have tried: I have reset the browser On startup setting to open my homepage, but it still opens with the aforementioned weird URL.
Thing that may help: Opera browser is very considerate cause it has this option regarding the On startup setting, which is Ask me when Opera is started by a shortcut specifying an URL.
Analysis and need your help: Usually, I start a browser by clicking on the shortcut in Windows start menu, or the shortcut in desktop. This worked normally until the problem appeared. According to Thing that may help, this hostile URL must reside somewhere. Where can I find this unwelcoming shortcut on my computer? How come this shortcut can attach itself to every web browser on my computer? What is the next step I can do to resolve this problem? Is this kind of a virus?
Usually when that happens, you'll have to:
reset the browser settings (or at least reset the startup websites on settings)
go to the browser .exe, open it's properties and remove any flags that were added on the path.
I think you shoud uninstall these applications first.
how to remove the alert that ask to open link in other application?
this alert
i followed this stack and it works fine
but i want to know how can i remove alert and just open IE directly like the default option of windows10 (microsoft-edge:url(it ask nothing from user and just open the edge browser with url))
From your description, It looks like you want to use Internet Explorer as your default browser.
Here I assume that you are using Windows 10 OS.
You can follow steps below to make Internet Explorer as a default browser.
(1) Open Settings in Windows 10.
(2) Go to Apps and click on it.
(3) Select Default apps option.
(4) Find a category for Web browser.
(5) Click on the web browser, It will show you the option for Internet Explorer.
(6) Select IE and set it as default app for web browsing.
Reference:
Change your default browser in Windows 10
In the same dialog, For choosing the app. you can choose the app and check the check box to remember your choice may also help you to remove this dialog.
Not a duplicate of: "How to open URL in Microsoft Edge from the command line?": This question is not a duplicate of the question linked above. The question linked above is about having Edge display a specified URL when launched from the command line. This question is about how a program external to the browser is launched by clicking on a link from within a web browsers such as Chrome and Firefox. I would appreciate it if someone would reopen this.
I was wondering how Microsoft is able to open up their applications such as Store and Edge from my browser.
For example when I'm using Google Chrome,
On their site at the top there is a message saying (it only seems to appear if you use Windows) "Try Microsoft Edge".
If you press Get started there is a confirmation screen that launches Edge. This is from Chrome but it seems to work in Firefox as well.
This can also be seen on the Microsoft Web Store, which opens the Store on Windows 10 (once again this only works if you're on Windows)
As far as I know application cannot be launched from a webpage so how do they do it?
I have a web application that uses IIS, but when I try to debug it VS just locks up and gives me the hour glass cursor icon. No browser window opens, nor does an instance pop up in the Task Manager. VS says its Running / not "Not Responding", but I cannot interact with the IDE. Can't Ctrl-Break to stop or anything.
I was able to run it before, and I'm not aware of any system or IIS changes that could cause this. I've disabled source control and I've tried launching the app in both Chrome and IE but it still behaves the exact same way as described above.
Has anyone else encountered this? The only threads I could find just describe general slowness in the IDE but otherwise its functional. The recommended fix was to disable the source control functionality, which as I said I already tried.
I should note that I don't seem to have an issue running & debugging winforms applications. I also just created a web application and was able to launch it in Chrome and get to the homepage. Also, it doesn't make a difference if I have a breakpoint set or not.
This solution has 4 different projects. If I set a different project as the Startup Project, it does run and launches the browser but it just gives me a 'file explorer' sort of view where it just lists the files in that project's directly which is obviously not what I want.
Edit; If I manually open a browser tab, try to navigate to http://localhost/myApplication, VS pops up and asks if I want to attach process w3wp.exe to IIS APPPOOL\myAppPool. If I attach, it opens a new tab in Chrome and my application runs. But unless I do these 2 steps, it does not run.
How can I determine which is the default browser in my system programatically. The code must be developed using vc++
Is there any API for this ?
Where in the registry is the default browser value stored?
TL;DR: If HKEY_CURRENT_USER\Software\Clients\StartMenuInternet\ exists read that; otherwise read HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\.
After reading the answers here I found little concensus on how to detect the default browser so I did some experiments and research to figure it out. I downloaded the Firefox source, wrote a script that reads a bunch of registry entries and also ran Process Explorer all while changing the default browser over and over.
I found there are a lot of registry keys that Firefox and Chrome change when each sets itself as the default browser. I believe Safari and Opera are both similar in behavior. IE appears to change only one of the registry keys I was watching.
What I found was that while most browsers change other registry paths, all browsers change HKEY_CURRENT_USER\Software\Clients\StartMenuInternet\ (default)
Here are the registry value from the registry key HKEY_CURRENT_USER\Software\Clients\StartMenuInternet\ (default) while each browser is the default browser.
IE 9.0.8112.16421: IEXPLORE.EXE
Chrome 21.0.1180.60 m: Google Chrome
Firefox 10.0.2: FIREFOX.EXE
Safari 3.2.2: Safari.exe
Opera 12.01: Opera
Tested on Microsoft Windows 7 Home Premium SP1 64-bit
Edit:
I found on a fresh install of Windows XP SP3 HKEY_CURRENT_USER\SOFTWARE\Clients\StartMenuInternet\ does not exist. In this case you should read the default browser from HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\. I suspect this is also the case on fresh installs of other versions of Windows.
Addendum:
The ShellExecute method is a great solution if all you want to do is open a web page in the default browser. However, if you want to, for example, install an extension in only the default browser, ShellExecute does not solve the problem.
You normally do not need to know this. ShellExecute(0,0,"http://stackoverflow.com",0,0,SW_SHOWNORMAL); will do the trick. Windows will spot the http:// and figure out from there that you want to open a URL. The "default" webbrowser is pretty much defined as the webbrowser used by Windows for this task.
It's not just http:// which is supported. ShellExecute can start the default webbrowser with https:// URLs as well. For mailto: URLs, it starts the default mail client.
you can find the default browser in the registry
i.e. for Windows XP and Vista is located at
HKEY_LOCAL_MACHINE\Software\Clients\StartMenuInternet\
As its name suggests, StartMenuInternet is for registering a Web browser onto the Start Menu (and it only applies to XP and Vista, it is deprecated starting with Windows 7). That does not necessarily establish the browser as the default browser for the entire system. There are many different ways a browser can be registered for different purposes (loading a file, loading a URL, loading data based on a MIME type, etc). Each of those registrations are separate.
Default Programs
How to Register an Internet Browser or Email Client With the Windows Start Menu
Registering an Application to a URL Protocol
File Types
Personally, I would probably look at the registration of the "http" and/or "https" URL handler to determine the default browser, since that will be the app that loads when the user types a URL into the Start Menu or Windows Explorer, or an app passes a URL to ShellExecute/Ex().
Read the default value of HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet and optionally check HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\XXX\shell\open\command where XXX is that value picked up from the first key.