So no, you do not have to declare the version number in the URL, and if you do it makes zero difference. The install stub will check for the latest package and install that. But that doesn't matter which one you grab. If you compare both installers that get downloaded, their hashes match ( get-filehash). It will always download the latest version (~70mb).īack the URL up to and you get 369.115 in place of what you linked 375.126. Start-Process -FilePath $Path$Installer -Args "/silent /install" -Verb RunAs -WaitĪlso, I believe this will always download the exact same version of chrome (375.126), so it would become outdated almost immediately Otherwise the name comes out "ChromeSetup.exe". Stylus allows you to easily install themes and skins for many popular sites. Redesign the web with Stylus, a user styles manager. Discover great apps, games, extensions and themes for Google Chrome. Invoke-WebRequest "" -OutFile $Path$Installerĭownload it to temp and give it that specific name we declared. Discover great apps, games, extensions and themes for Google Chrome. C:\Users\name\Local\Tempĭeclaring the installer variable name for later use. This is the local path where the installer gets downloaded. Would make something like this way easier! I am hoping Winget really takes off, so we could have a proper package manager built into windows. If so, you might be able to use that instead? I wonder if Google has a generic URL that always redirects to the installer for current build of chrome. Also, I believe this will always download the exact same version of chrome (375.126), so it would become outdated almost immediately. I think the variables cost more scripting than they save in this example. I bet you could simplify it by skipping the variables, and just using an explicit path and file name. I'm not very familiar with Powershell, but basically it looks like you are setting up variables for a path (the temp folder in this case) and a file name, downloading a specific version of the chrome installer, running the file in silent mode, and then deleting the file once it's done. $Path = $env:TEMP $Installer = "chrome_installer.exe" Invoke-WebRequest " " -OutFile $Path$Installer Start-Process -FilePath $Path$Installer -Args "/silent /install" -Verb RunAs -Wait Remove-Item $Path$Installer TLDW: dump the following string into a powershell prompt (running as admin).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |