This VBScript demo shows how to remove Internet Explorer in Windows 7.
In some situations, customers need to uninstall Internet Explorer 9 to fix crash issue, but they cannot manually uninstall Internet Explorer successfully sometimes.
Step 1: Double-click RemoveInternetExplorer.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.
If Flag > 0 Then
resultRemoveIE = MsgBox("Are you sure you want to remove Internet Explorer. This process might take a long time, so please be patient.",vbYesNo+vbQuestion,"Remove the Internet Explorer")
If resultRemoveIE = 6 Then
Set objExecObject = objShell.Exec("Dism /online /Disable-Feature /FeatureName:Internet-Explorer-Optional-amd64")
While objExecObject.Status = 0
WScript.Sleep 1
Wend
Call ChoicePromt
End If
Else
resultRemoveIE = MsgBox("Internet Explorer is already disabled, do you want to enable the Internet Explorer? This process might take a long time, so please be patient.",vbYesNo+vbQuestion,"Enable the Internet Explorer")
If resultRemoveIE = 6 Then
Set objExecObject = objShell.Exec("Dism /online /Enable-Feature /FeatureName:Internet-Explorer-Optional-amd64")
While objExecObject.Status = 0
WScript.Sleep 1
Wend
Call ChoicePromt
End If
End If
If Flag > 0Then resultRemoveIE = MsgBox("Are you sure you want to remove Internet Explorer. This process might take a long time, so please be patient.",vbYesNo+vbQuestion,"Remove the Internet Explorer") If resultRemoveIE = 6ThenSet objExecObject = objShell.Exec("Dism /online /Disable-Feature /FeatureName:Internet-Explorer-Optional-amd64") While objExecObject.Status = 0 WScript.Sleep 1WendCall ChoicePromt EndIfElse resultRemoveIE = MsgBox("Internet Explorer is already disabled, do you want to enable the Internet Explorer? This process might take a long time, so please be patient.",vbYesNo+vbQuestion,"Enable the Internet Explorer") If resultRemoveIE = 6ThenSet objExecObject = objShell.Exec("Dism /online /Enable-Feature /FeatureName:Internet-Explorer-Optional-amd64") While objExecObject.Status = 0 WScript.Sleep 1WendCall ChoicePromt EndIfEndIf
Windows 7