{"id":32,"date":"2019-05-25T23:02:12","date_gmt":"2019-05-25T23:02:12","guid":{"rendered":"https:\/\/tomtechproductions.be\/?p=32"},"modified":"2019-05-25T23:02:12","modified_gmt":"2019-05-25T23:02:12","slug":"set-homepage-chrome","status":"publish","type":"post","link":"https:\/\/blog.tomtechproductions.be\/index.php\/2019\/05\/25\/set-homepage-chrome\/","title":{"rendered":"Set homepage Chrome"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">You can&#8217;t set the default browser page from Google chrome with gpo&#8217;s. So here is a script that will set the default page from your Google Chrome browser.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>#paths for chrome policy keys used in the scripts\n$policyexists = Test-Path HKLM:\\SOFTWARE\\Policies\\Google\\Chrome\n$policyexistshome = Test-Path HKLM:\\SOFTWARE\\Policies\\Google\\Chrome\\RestoreOnStartupURLs\n$regKeysetup = \"HKLM:\\SOFTWARE\\Policies\\Google\\Chrome\"\n$regKeyhome = \"HKLM:\\SOFTWARE\\Policies\\Google\\Chrome\\RestoreOnStartupURLs\"\n$url = \"https:\/\/sint-norbertus.be\"\n\n#setup policy dirs in registry if needed and set pwd manager\n#else sets them to the correct values if they exist\nif ($policyexists -eq $false){\nNew-Item -path HKLM:\\SOFTWARE\\Policies\\Google\nNew-Item -path HKLM:\\SOFTWARE\\Policies\\Google\\Chrome\nNew-ItemProperty -path $regKeysetup -Name PasswordManagerEnabled -PropertyType DWord -Value 0\nNew-ItemProperty -path $regKeysetup -Name RestoreOnStartup -PropertyType Dword -Value 4\nNew-ItemProperty -path $regKeysetup -Name HomepageLocation -PropertyType String -Value $url\nNew-ItemProperty -path $regKeysetup -Name HomepageIsNewTabPage -PropertyType DWord -Value 0\n}\n\nElse {\nSet-ItemProperty -Path $regKeysetup -Name PasswordManagerEnabled -Value 0\nSet-ItemProperty -Path $regKeysetup -Name RestoreOnStartup -Value 4\nSet-ItemProperty -Path $regKeysetup -Name HomepageLocation -Value $url\nSet-ItemProperty -Path $regKeysetup -Name HomepageIsNewTabPage -Value 0\n}\n\n#This entry requires a subfolder in the registry\n#For more then one page create another new-item and set-item line with the name -2 and the new url\nif ($policyexistshome -eq $false){\nNew-Item -path HKLM:\\SOFTWARE\\Policies\\Google\\Chrome\\RestoreOnStartupURLs\nNew-ItemProperty -path $regKeyhome -Name 1 -PropertyType String -Value $url\n}\nElse {\nSet-ItemProperty -Path $regKeyhome -Name 1 -Value $url\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>You can&#8217;t set the default browser page from Google chrome with gpo&#8217;s. So here is a script that will set the default page from your Google Chrome browser. #paths for chrome policy keys used in the scripts $policyexists = Test-Path HKLM:\\SOFTWARE\\Policies\\Google\\Chrome $policyexistshome = Test-Path HKLM:\\SOFTWARE\\Policies\\Google\\Chrome\\RestoreOnStartupURLs $regKeysetup = &#8220;HKLM:\\SOFTWARE\\Policies\\Google\\Chrome&#8221; $regKeyhome = &#8220;HKLM:\\SOFTWARE\\Policies\\Google\\Chrome\\RestoreOnStartupURLs&#8221; $url = &#8220;https:\/\/sint-norbertus.be&#8221; #setup &hellip; <span class=\"read-more\"><a href=\"https:\/\/blog.tomtechproductions.be\/index.php\/2019\/05\/25\/set-homepage-chrome\/\" class=\"more-link\">Read More<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":34,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,6,7],"tags":[26,27,28],"class_list":["post-32","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-google-chrome","category-webbrowser","category-windows","tag-google-chrome","tag-gpo","tag-homepage"],"_links":{"self":[{"href":"https:\/\/blog.tomtechproductions.be\/index.php\/wp-json\/wp\/v2\/posts\/32","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.tomtechproductions.be\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.tomtechproductions.be\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.tomtechproductions.be\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.tomtechproductions.be\/index.php\/wp-json\/wp\/v2\/comments?post=32"}],"version-history":[{"count":0,"href":"https:\/\/blog.tomtechproductions.be\/index.php\/wp-json\/wp\/v2\/posts\/32\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.tomtechproductions.be\/index.php\/wp-json\/wp\/v2\/media\/34"}],"wp:attachment":[{"href":"https:\/\/blog.tomtechproductions.be\/index.php\/wp-json\/wp\/v2\/media?parent=32"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.tomtechproductions.be\/index.php\/wp-json\/wp\/v2\/categories?post=32"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.tomtechproductions.be\/index.php\/wp-json\/wp\/v2\/tags?post=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}