Skip to content

Deploying MSEdgeRedirect

Robert C. Maehl edited this page Aug 30, 2023 · 29 revisions

Getting Setup for Deployment

Create a Setup.ini file using the following guide

BUSINESS? Learn more about Branding, Promotions, and Priority Support  

Config Section

Key Name Valid Values Description Default Version Added Last Modified
Managed * True
* False
IF TRUE: sets values in HKLM\SOFTWARE\Policies\Robert Maehl Software\MSEdgeRedirect. The application will ignore settings in HKLM\SOFTWARE\Robert Maehl Software\MSEdgeRedirect or HKCU\SOFTWARE\Robert Maehl Software\MSEdgeRedirect False 0.5.0.0 -
Mode * Active
* Service
IF ACTIVE: a system-wide, always ready, install via Image File Execution Options is made in Program Files

IF SERVICE: a single user install is made in LocalAppData. The application will only run if set to run on startup, or manually executed.
Service 0.5.0.0 -

Settings Section

Key Name Valid Values Description Default Added Modified
Edges * Stable
* Beta
* Dev
* Canary
* Removed
ONLY VALID FOR ACTIVE MODE

A comma separated list of Edge Browsers to redirect
Stable, Beta 0.5.0.0 0.7.0.0
NoApps * True
* False
IF TRUE: de-embeds Windows Store "apps" that run in Edge to their fallback URLs (TikTok, Twitter, Wikipedia, and more) False 0.5.0.0 -
NoBing * True
* False
IF TRUE: redirects Bing Searches to the Search Engine as configured using the Search key False 0.5.0.0 -
NoImgs * True
* False
IF TRUE: redirects Bing Images to the Images Provider as configured using the Images key False 0.7.0.0 -
NoMSN * True
* False
IF TRUE: redirects MSN Weather to the Weather Provider as configured using the Weather key False 0.6.0.0 -
NoNews * True
* False
IF TRUE: redirects Bing/MSN News to the "I'm Feeling Lucky" Provider as configured using the News key False 0.7.0.0 -
NoPDFs * True
* False
IF TRUE: redirects PDF files to the Application Path as configured using the PDFApp key False 0.5.0.0 -
NoTray * True
* False
ONLY VALID FOR SERVICE MODE

IF TRUE: hides the system tray icon for MSEdgeRedirect
False 0.5.0.0 -
NoUpdates * True
* False
IF TRUE: prevents the application from checking for updates False 0.5.0.0 -
Images * Baidu
* Custom
* DuckDuckGo
* Ecosia
* Google
* Sogou
* Yahoo
* Yandex
IF SET: Redirects Image Searches to the Image Provider selected <empty> 0.7.0.0 -
ImagePath <URL> A URL path that an image query will be appended to <empty> 0.7.0.0 -
News * Bing
* Google
IF SET: Redirects Bing/MSN News to the "I'm Feeling Lucky" Provider selected <empty> 0.7.0.0 -
PDFApp <File Path> A non-relative path to an executable that will handle redirected PDF files <empty> 0.5.0.0 -
Search * Ask
* Baidu
* Custom
* DuckDuckGo
* Ecosia
* Google
* Sogou
* Yahoo
* Yandex
IF SET: Redirects Web Searches to the Search Engine selected

IF CUSTOM: Redirects Web Searches to the URL as configured using the SearchPath key
<empty> 0.5.0.0 -
SearchPath <URL> A URL path that the search query will be appended to <empty> 0.5.0.0 -
StartMenu * Full
* AppOnly
* None
Shortcuts added to shell:common programs for Active Type or shell:programs for Service Type

IF FULL: the application adds start menu items for launching the application and configuring it

ONLY VALID FOR SERVICE MODE:

IF APPONLY: the application adds a start menu item only for launching the application
Full 0.5.0.0 0.6.0.0
Startup * True
* False
ONLY VALID FOR SERVICE MODE

IF TRUE: the application runs on startup by adding a shortcut to shell:common startup for System Type or shell:startup for User Type
True 0.5.0.0 -
Weather * AccuWeather
* Darksky
* Windy
* WUnderground
* Weather.com
* Weather.gov
* Ventusky
* Yandex
IF SET: Redirects Weather Searches to the Weather Provider selected <empty> 0.6.0.0 0.6.3.0

Example File

[Config]
Managed=True
Mode=Active

[Settings]
Edges=Stable,Beta,Dev,Canary
NoApps=True
NoBing=True
NoImgs=True
NoMSN=True
NoPDFs=True
NoTray=True
NoUpdates=True
Images=Google
News=DuckDuckGo
PDFApp=C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
Search=Custom
SearchPath=https://search.aol.com/aol/search?q=
StartMenu=AppOnly
Startup=False
Weather=Weather.gov

 

Deploying

Deploying with Batch Files

  1. Create the Setup.ini file

  2. Run the silent install command

    • If you have the Setup.ini file in the same directory as the installer:
      Run msedgeredirect.exe /silentinstall

    • If you have the Setup.ini file in a separate directory from the installer:
      Run msedgeredirect.exe /silentinstall C:\Path\To\Setup.ini

      UNC Paths are NOT YET supported.

  3. ERRORLEVEL will report a code from the Return Values table

  4. (Optionally) Run start microsoft-edge:www.google.com to test the install

 
NOTE: Please be sure your are checking ERRORLEVEL not %ERRORLEVEL%.
See https://devblogs.microsoft.com/oldnewthing/20080926-00/?p=20743

Deploying with Powershell Scripts

  1. Create the Setup.ini file

  2. Run the silent install command

    • If you have the Setup.ini file in the same directory as the installer:
      Run $exit=(Start-Process MSEdgeRedirect.exe -ArgumentList "/silentinstall" -PassThru -Wait).ExitCode

    • If you have the Setup.ini file in a separate directory from the installer:
      Run $exit=(Start-Process MSEdgeRedirect.exe -ArgumentList "/silentinstall","C:\Path\To\Setup.ini" -PassThru -Wait).ExitCode

      UNC Paths are NOT YET supported.

  3. $exit will report a code from the Return Values table

  4. (Optionally) Run start-process microsoft-edge:www.google.com to test the install

 

Return Values

Int Name Reason(s)
0 ERROR_SUCCESS Install was successful
2 ERROR_FILE_NOT_FOUND Setup.ini was not found
5 ERROR_ACCESS_DENIED The program was ran without admin rights during:
* Managed set to True
* Mode set to Active
* An update to an existing Admin Rights install
87 ERROR_INVALID_PARAMETER A passed command line flag was incorrect
160 ERROR_BAD_ARGUMENTS The Setup.ini file had one or more invalid values
216 ERROR_EXE_MACHINE_TYPE_MISMATCH You are running MSEdgeRedirect_x86.exe on a 64-bit machine
1359 ERROR_INTERNAL_ERROR The program encountered an unexpected system or program state. Please create a bug report with the PEBIAT.log file attached
4315 ERROR_MEDIA_INCOMPATIBLE The same Microsoft Edge is currently set as both the default browser and microsoft-edge handler. The action was aborted to prevent infinite looping.

 

Maintenance and Continuous Use

Keeping Edge off the Default Browser (0.8.0.0 and earlier)

Microsoft likes to ocassionally break the Default Web Browser after updates. If you are have a Windows AD environment, it's recommended to use the GPO recommended by Chrome Support. If this is not feasible, or you are using a non-enterprise Windows version, you can use SetUserFTA.

Maintaining Edge when using Active Mode (0.7.3.0 and earlier)

It is highly recommended that you create a task scheduler task to keep msedge_no_ifeo.exe updated as Windows will complain if there is a version mismatch. Example Task Scheduler Tasks can be found in the Task Scheduler Tasks folder in the Assets Folder.