Aug 16, 2024

Windows : Microsoft Edge Browser with Script

Sometimes we just need to create a shortcut that run Microsoft Edge browser to a specific URL or Website. This could be achieved easily if your "Default" browser is configured to Microsoft Edge, but what if your computer have 2 or more browsers like Google Chrome ?

This is especially true if the "Default" browser is configured to Google Chrome and that specific URL or Website only works with Microsoft Edge.

Thus by simply creating a shortcut to open that specific URL will only opens up Google Chrome instead of Microsoft Edge which is a bummer.

Let's get started :-

1. First you will need to create .vbs file with the following code.


Set Edge = CreateObject("WScript.Shell")
Edge.Run "msedge.exe https://demo.com"


* Replaced https://demo.com with your specific URL.

2. Save the above file as "edge.vbs", you can of course name it whatever filename you want.


3. Then create the shortcut to that "edge.vbs" on your desktop or any location you preferred.


4. If you want Microsoft Edge to open up with "Maximized" screen, just add the following line into .vbs file.


Set Edge = CreateObject("WScript.Shell")
Edge.Run "msedge.exe https://demo.com", 3, false



Now Microsoft Edge will open that specific website in maximized screen.


!!! HAPPY COMPUTING !!!

No comments:

Post a Comment