{"id":67823,"date":"2006-03-06T19:17:00","date_gmt":"2006-03-06T19:17:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2006\/03\/06\/how-can-i-change-the-internet-explorer-title-bar\/"},"modified":"2006-03-06T19:17:00","modified_gmt":"2006-03-06T19:17:00","slug":"how-can-i-change-the-internet-explorer-title-bar","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/how-can-i-change-the-internet-explorer-title-bar\/","title":{"rendered":"How Can I Change the Internet Explorer Title Bar?"},"content":{"rendered":"<p><P>&nbsp;<\/P><IMG class=\"nearGraphic\" title=\"Hey, Scripting Guy! Question\" border=\"0\" alt=\"Hey, Scripting Guy! Question\" align=\"left\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/q-for-powertip.jpg\" width=\"34\" height=\"34\"> \n<P>Hey, Scripting Guy! I recently signed up with a new Internet service and now every time I start Internet Explorer the window title says <I>Internet Explorer Provided by Fabrikam.com<\/I>. How can I change the Internet Explorer title bar?<BR><BR>&#8212; AD<\/P><IMG border=\"0\" alt=\"Spacer\" src=\"https:\/\/devblogs.microsoft.com\/scripting\/wp-content\/uploads\/sites\/29\/2019\/05\/spacer.gif\" width=\"5\" height=\"5\"><IMG class=\"nearGraphic\" title=\"Hey, Scripting Guy! Answer\" border=\"0\" alt=\"Hey, Scripting Guy! Answer\" align=\"left\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\" width=\"34\" height=\"34\"><A href=\"http:\/\/go.microsoft.com\/fwlink\/?linkid=68779&amp;clcid=0x409\"><IMG class=\"farGraphic\" title=\"Script Center\" border=\"0\" alt=\"Script Center\" align=\"right\" src=\"http:\/\/img.microsoft.com\/library\/media\/1033\/technet\/images\/scriptcenter\/ad.jpg\" width=\"120\" height=\"288\"><\/A> \n<P>Hey, AD. You know, you\u2019ve presented the Scripting Guys with a moral and ethical dilemma. Just about the same time we received your email we got a second email that read something like this:<\/P>\n<P>\u201cHey, Scripting Guy! I know that a lot of companies have configured Internet Explorer so that each time their users start Internet Explorer the window title says <I>Internet Explorer Provided by Fabrikam.com<\/I>, and I\u2019d like to do that too. How can I change the Internet Explorer title bar?\u201d<\/P>\n<P>So is it a good thing to have a title bar that says <I>Internet Explorer Provided by Fabrikam.com<\/I> or is it a <I>bad<\/I> thing to have a title bar that says <I>Internet Explorer Provided by Fabrikam.com<\/I>? Beats the heck out of us. But, then again , as Scripting Guys it\u2019s not really our job to tell you which actions are good and which actions are evil. It\u2019s just our job to provide people with scripts that can change the Internet Explorer title bar:<\/P><PRE class=\"codeSample\">Const HKEY_CURRENT_USER = &amp;H80000001<\/p>\n<p>strComputer = &#8220;.&#8221;<\/p>\n<p>Set objReg = GetObject(&#8220;winmgmts:\\\\&#8221; &amp; strComputer &amp; &#8220;\\root\\default:StdRegProv&#8221;)<\/p>\n<p>strKeyPath = &#8220;SOFTWARE\\Microsoft\\Internet Explorer\\Main&#8221;\nstrValueName = &#8220;Window Title&#8221;\nstrValue = &#8220;The Scripting Guys&#8221;<\/p>\n<p>objReg.SetStringValue HKEY_CURRENT_USER, strKeyPath, strValueName, strValue\n<\/PRE>\n<P>By default Internet Explorer displays the page title for any Web page it opens (or the URL if the page doesn\u2019t have a title). The title is then followed by the phrase <I>Microsoft Internet Explorer<\/I>. To change this to some other phrase (or to delete the appended phrase altogether) you need to modify the registry value <B>HKCU\\Software\\Microsoft\\Internet Explorer\\Main\\Window Title<\/B>. For example, after setting the value of Window Title to <I>The Scripting Guys<\/I> Internet Explorer will look like this:<\/P><IMG border=\"0\" alt=\"Internet Explorer\" src=\"http:\/\/img.microsoft.com\/library\/media\/1033\/technet\/images\/scriptcenter\/qanda\/ietitle1.jpg\" width=\"350\" height=\"326\"> \n<P><BR>Cool, huh? If you change Window Title to <I>Internet Explorer Provided by Fabrikam.com<\/I>, then that\u2019s the phrase that will appear after the page title. If you change the value to an empty string (\u201c\u201d) then the only thing that will appear in the Internet Explorer title bar is the page name:<\/P><IMG border=\"0\" alt=\"Internet Explorer\" src=\"http:\/\/img.microsoft.com\/library\/media\/1033\/technet\/images\/scriptcenter\/qanda\/ietitle2.jpg\" width=\"350\" height=\"326\"> \n<P>&nbsp;<\/P>\n<TABLE id=\"EEE\" class=\"dataTable\" cellSpacing=\"0\" cellPadding=\"0\">\n<THEAD><\/THEAD>\n<TBODY>\n<TR class=\"record\" vAlign=\"top\">\n<TD>\n<P class=\"lastInCell\"><B>Note<\/B>. What if you <I>delete<\/I> the registry value? In that case, Internet Explorer automatically reverts back to the default phrase <I>Microsoft Internet Explorer<\/I>.<\/P><\/TD><\/TR><\/TBODY><\/TABLE>\n<DIV class=\"dataTableBottomMargin\"><\/DIV>\n<P>Now that we know how the title bar works, how does the <I>script<\/I> work? Well, it starts off by defining a constant named HKEY_CURRENT_USER and setting the value to &amp;H80000001; this tells the Standard Registry Provider (the WMI object we use to modify the registry) which registry hive we want to work with. We then use this line of code to bind to the Standard Registry Provider on the local computer:<\/P><PRE class=\"codeSample\">Set objReg = GetObject(&#8220;winmgmts:\\\\&#8221; &amp; strComputer &amp; &#8220;\\root\\default:StdRegProv&#8221;)\n<\/PRE>\n<P>And yes, unlike Windows Script Host\u2019s registry methods, you can use the Standard Registry Provider to read from and write to the registry on a remote computer. All you have to do is assign the name of that remote machine to the variable strComputer.<\/P>\n<P>After we make the connection we then assign values to three different variables:<\/P>\n<TABLE border=\"0\" cellSpacing=\"0\" cellPadding=\"0\">\n<TBODY>\n<TR>\n<TD class=\"listBullet\" vAlign=\"top\">\u2022<\/TD>\n<TD class=\"listItem\">\n<P><B>strKeyPath<\/B> is the the registry key where Window Title is found. In this case, that\u2019s Software\\Microsoft\\Internet Explorer\\Main.<\/P><\/TD><\/TR>\n<TR>\n<TD class=\"listBullet\" vAlign=\"top\">\u2022<\/TD>\n<TD class=\"listItem\">\n<P><B>strValueName<\/B> is the name of the registry value we want to modify (Window Title).<\/P><\/TD><\/TR>\n<TR>\n<TD class=\"listBullet\" vAlign=\"top\">\u2022<\/TD>\n<TD class=\"listItem\">\n<P><B>strValue<\/B> is the new value to be assigned to Window Title. Because Window Title has a data type of REG_SZ, strValue must be a string value. As we noted earlier, setting strValue to an empty string (\u201c\u201d) will result in no additional verbiage being added to the Internet Explorer title bar.<\/P><\/TD><\/TR><\/TBODY><\/TABLE>\n<P>To actually change the registry value all we have to do is call the <B>SetStringValue<\/B> method, passing our constant and three variables (in this order):<\/P><PRE class=\"codeSample\">objReg.SetStringValue HKEY_CURRENT_USER, strKeyPath, strValueName, strValue\n<\/PRE>\n<P>And there you have it. If Window Title doesn\u2019t exist, no problem: SetStringValue will first create the new registry value and then assign it the desired string. <\/P>\n<P>That\u2019s all we can do with this; from here on it\u2019s up to each of you to decide how to best use this new-found knowledge. Choose wisely.<\/P><BR>\n<DIV>\n<TABLE border=\"0\" cellSpacing=\"0\" cellPadding=\"0\" width=\"100%\">\n<TBODY>\n<TR>\n<TD><A href=\"http:\/\/www.microsoft.com\/technet\/scriptcenter\/resources\/qanda\/mar06\/hey0306.mspx#top\"><IMG border=\"0\" alt=\"Top of page\" src=\"http:\/\/www.microsoft.com\/technet\/mnplibrary\/templates\/MNP2.Common\/images\/arrow_px_up.gif\" width=\"7\" height=\"9\"><\/A><A class=\"topOfPage\" href=\"http:\/\/www.microsoft.com\/technet\/scriptcenter\/resources\/qanda\/mar06\/hey0306.mspx#top\">Top of page<\/A><\/TD><\/TR><\/TBODY><\/TABLE><\/DIV><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Hey, Scripting Guy! I recently signed up with a new Internet service and now every time I start Internet Explorer the window title says Internet Explorer Provided by Fabrikam.com. How can I change the Internet Explorer title bar?&#8212; AD Hey, AD. You know, you\u2019ve presented the Scripting Guys with a moral and ethical dilemma. [&hellip;]<\/p>\n","protected":false},"author":595,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[17,31,26,3,5],"class_list":["post-67823","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-internet-explorer","tag-operating-system","tag-registry","tag-scripting-guy","tag-vbscript"],"acf":[],"blog_post_summary":"<p>&nbsp; Hey, Scripting Guy! I recently signed up with a new Internet service and now every time I start Internet Explorer the window title says Internet Explorer Provided by Fabrikam.com. How can I change the Internet Explorer title bar?&#8212; AD Hey, AD. You know, you\u2019ve presented the Scripting Guys with a moral and ethical dilemma. [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/67823","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/595"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=67823"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/67823\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=67823"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=67823"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=67823"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}