Script to make the desktop Internet Explorer default in Windows 8 (VBScript)

Introduction

This VBScript shows how to make the Desktop Internet Explorer default in Windows 8.

Scenarios

By default, when you click on a web link in the Windows 8, Internet Explorer will open that web page in the Windows 8 version of IE (non-desktop Internet Explorer).  But some users want to make the Desktop Internet Explorer default when they open a web link anywhere.

Script

Step 1: Double-click SetDesktopIE.vbs to run this VBScript sample. The step is shown in the following figure.

When script finishes running, you will see something as shown in the following figure.

Here are some code snippets for your references. To get the complete script sample, please click the download button at the beginning of this page.

VB Script
Edit|Remove
If Err.Number = 0Then'Setting the registry keyIf AssociationActivationMode = 2Then 
        WScript.Echo "You have already been set the desktop Internet Explorer mode."Else 
        objShell.RegWrite regKeyPath,2,"REG_DWORD" 
        WScript.Echo "Set the desktop Internet Explorer mode default successfully."EndIfElse 
    objShell.RegWrite regKeyPath,2,"REG_DWORD" 
    WScript.Echo "Set the desktop Internet Explorer mode default successfully."EndIf

Prerequisite

Windows 8