Created
January 17, 2016 17:18
-
-
Save yakovsh/fb7eac2d07aa557e0342 to your computer and use it in GitHub Desktop.
IE Titlebar Changer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' | |
' Based on column by Walter Mossberg <[email protected]>. Check out his | |
' page at http://pctech.wsj.com | |
' | |
Dim strName | |
Dim WshShell | |
Dim strOldTitle | |
Dim strNewTitle | |
Dim intTemp | |
' Display first box | |
strName = "IE Titlebar Changer v1.00" | |
MsgBox "This little VB script changes the titlebar for Internet Explorer.", vbOKOnly, strName | |
' Get key | |
Set WshShell = Wscript.GetObject("","Wscript.Shell") | |
on error resume next | |
strOldTitle = WshShell.RegRead("HKLM\Software\Microsoft\Internet Explorer\Main\Window Title") | |
' check if the titlebar exists | |
If Err.Number <> 0 Then | |
intTemp = MsgBox("You do not have the Internet Explorer titlebar set in your computer. Do you wish to set it?", vbYesNo, strName) | |
If intTemp = vbNo Then | |
MsgBox "Not in the mood today? Alrighty then, see ya!", vbOKOnly, strName | |
Wscript.Quit | |
End If | |
Err.Clear | |
Else | |
intTemp = MsgBox("Do you wish to remove the Internet Explorer titlebar?", vbYesNo, strName) | |
If intTemp = vbYes then | |
WshShell.RegDelete "HKLM\Software\Microsoft\Internet Explorer\Main\Window Title" | |
MsgBox "Some things just gotta go... See ya!", vbOKOnly, strName | |
Wscript.Quit | |
End If | |
End If | |
' Ask the user to change it | |
strNewTitle = InputBox("Change the title of Internet Explorer to what you want and click OK", strName, strOldTitle) | |
' If the user changed it, verify it and change it. | |
If strNewTitle <> "" Then | |
intTemp = MsgBox("Are you sure you want to change the titlebar?", vbYesNo, strName) | |
If intTemp = vbYes then | |
WshShell.RegWrite "HKLM\Software\Microsoft\Internet Explorer\Main\Window Title", strNewTitle | |
MsgBox "Titlebar changed to " & strNewTitle & ". See ya!" | |
else | |
MsgBox "Guess you changed your mind! See ya!", vbOKOnly, strName | |
End If | |
End If |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment