{"id":3036,"date":"2024-05-18T10:33:48","date_gmt":"2024-05-18T10:33:48","guid":{"rendered":"https:\/\/bigboxhost.com\/blog\/?p=3036"},"modified":"2024-05-23T04:52:52","modified_gmt":"2024-05-23T04:52:52","slug":"batch-and-powershell-script-to-install-google-chrome-browser-on-windows","status":"publish","type":"post","link":"https:\/\/bigboxhost.com\/blog\/batch-and-powershell-script-to-install-google-chrome-browser-on-windows\/","title":{"rendered":"Batch and PowerShell Script to install Google Chrome browser on Windows"},"content":{"rendered":"\n<p>Over the years, Google Chrome has ascended to become one of the most widely used web browsers globally, renowned for its seamless performance and intuitive user interface. Its popularity stems from a combination of uninterrupted service, rapid loading speeds, and a design that prioritizes ease of use. This makes it a preferred choice for both casual users and professionals alike.<\/p>\n\n\n\n<p>For organizations looking to streamline their software deployment process, especially when it comes to ensuring all devices are running the latest version of essential tools like web browsers, Google Chrome offers an efficient solution. By using the script provided below, IT departments can silently download and install the latest version of the Google Chrome browser on their Windows devices. This process requires no user intervention, making it an ideal method for maintaining browser consistency and security across multiple machines in a corporate environment.<\/p>\n\n\n\n<div class=\"wp-block-group is-vertical is-layout-flex wp-container-core-group-is-layout-8cf370e7 wp-block-group-is-layout-flex\">\n<h2 class=\"wp-block-heading\">Batch script<\/h2>\n\n\n\n<p>Create a file named <span class=\"highlight\">chrome-installer.bat<\/span> and add the following code to it and execute it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo Set o=CreateObject^(\"MSXML2.XMLHTTP\"^):Set a=CreateObject^(\"ADODB.Stream\"^):Set f=Createobject^(\"Scripting.FileSystemObject\"^):o.open \"GET\", \"https:\/\/dl.google.com\/tag\/s\/appguid%3D%7B8A69D345-D564-463C-AFF1-A69D9E530F96%7D%26iid%3D%7BACACE3C0-DE6A-03B5-599E-4340EBF8B4BE%7D%26lang%3Den%26browser%3D3%26usagestats%3D0%26appname%3DGoogle%2520Chrome%26needsadmin%3Dprefers%26ap%3Dx64-stable-statsdef_1%26installdataindex%3Dempty\/chrome\/install\/ChromeStandaloneSetup64.exe\", 0:o.send^(^):If o.Status=200 Then &gt;\"%temp%\\d.vbs\" &amp;echo a.Open:a.Type=1:a.Write o.ResponseBody:a.Position=0:If f.Fileexists^(\"%temp%\\s.exe\"^) Then f.DeleteFile \"%temp%\\s.exe\" &gt;&gt;\"%temp%\\d.vbs\" &amp;echo a.SaveToFile \"%temp%\\s.exe\" &gt;&gt;\"%temp%\\d.vbs\" &amp;echo End if &gt;&gt;\"%temp%\\d.vbs\" &amp;cscript \/\/B \"%temp%\\d.vbs\" &amp;del \/F \/Q \"%temp%\\d.vbs\" &amp;start \"\" \"%temp%\\s.exe\"<\/code><\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-vertical is-layout-flex wp-container-core-group-is-layout-8cf370e7 wp-block-group-is-layout-flex\">\n<h2 class=\"wp-block-heading\">PowerShell Script<\/h2>\n\n\n\n<p>Just open the PowerShell command prompt in your browser with administrator permission and paste the following code and hit enter.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$Path = $env:TEMP;  \n\n$Installerchrome = \"ChromeStandaloneSetup64.exe\";  \n(new-object System.Net.WebClient).DownloadFile('https:\/\/dl.google.com\/tag\/s\/appguid%3D%7B8A69D345-D564-463C-AFF1-A69D9E530F96%7D%26iid%3D%7BACACE3C0-DE6A-03B5-599E-4340EBF8B4BE%7D%26lang%3Den%26browser%3D3%26usagestats%3D0%26appname%3DGoogle%2520Chrome%26needsadmin%3Dprefers%26ap%3Dx64-stable-statsdef_1%26installdataindex%3Dempty\/chrome\/install\/ChromeStandaloneSetup64.exe', \"$Path\\$Installerchrome\"); \n&amp; \"$Path\\$Installerchrome\" \/silent \/install; \n$ProcesstoMonitor = \"ChromeStandaloneSetup64\"; \n\nDo  \n{ $ProcessFound = Get-Process | ?{$ProcesstoMonitor -contains $_.Name} | Select-Object -ExpandProperty Name;  \nIf ($ProcessFound) { \"Still running: $($ProcessFound -join ', ')\" | Write-Host; Start-Sleep -Seconds 2 }  \nelse  \n{ rm \"$Path\\$Installerchrome\" -ErrorAction SilentlyContinue -Verbose } }  \nUntil (!$ProcessFound) <\/code><\/pre>\n<\/div>\n\n\n\n<p>This script will download the Chrome browser and install it for you silently without any requirement for manual intervention. Once the process is complete, the newly installed Chrome browser icon will appear on your Desktop screen.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Over the years, Google Chrome has ascended to become one of the most widely used web browsers globally, renowned for its seamless performance and intuitive user interface. Its popularity stems from a combination of uninterrupted service, rapid loading speeds, and a design that prioritizes ease of use. This makes it a preferred choice for both [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3031,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"Batch and PowerShell Script to install Google Chrome browser on Windows","_seopress_titles_desc":"","_seopress_robots_index":"","_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[50],"tags":[51,61,54,59,60,56,52,53,58,57],"class_list":["post-3036","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-shorts","tag-batch","tag-browser","tag-chrome","tag-device","tag-google","tag-install","tag-powershell","tag-script","tag-server","tag-windows"],"_links":{"self":[{"href":"https:\/\/bigboxhost.com\/blog\/wp-json\/wp\/v2\/posts\/3036","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bigboxhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bigboxhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bigboxhost.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bigboxhost.com\/blog\/wp-json\/wp\/v2\/comments?post=3036"}],"version-history":[{"count":2,"href":"https:\/\/bigboxhost.com\/blog\/wp-json\/wp\/v2\/posts\/3036\/revisions"}],"predecessor-version":[{"id":3038,"href":"https:\/\/bigboxhost.com\/blog\/wp-json\/wp\/v2\/posts\/3036\/revisions\/3038"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bigboxhost.com\/blog\/wp-json\/wp\/v2\/media\/3031"}],"wp:attachment":[{"href":"https:\/\/bigboxhost.com\/blog\/wp-json\/wp\/v2\/media?parent=3036"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bigboxhost.com\/blog\/wp-json\/wp\/v2\/categories?post=3036"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bigboxhost.com\/blog\/wp-json\/wp\/v2\/tags?post=3036"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}