Last active
August 23, 2023 11:06
-
-
Save wincmd64/38a0cdf5c8a2174d63cc49e8251a9689 to your computer and use it in GitHub Desktop.
This file contains 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
:: Get direct links to latest Google Chrome offline installers for Windows 7 | |
:: (required powershell 5x -- https://microsoft.com/download/details.aspx?id=54616) | |
:: https://t.me/wincmd64 | |
@echo off | |
echo WORKING... | |
(echo ^<?xml version="1.0" encoding="UTF-8"?^> ^<request protocol="3.0" ismachine="1" installsource="ondemand" dedup="cr"^> ^<hw physmemory="4" sse3="1"/^> ^<os platform="win" version="7.0" arch="x86"/^> ^<app appid="{8A69D345-D564-463C-AFF1-A69D9E530F96}" release_channel="stable" ap=""^>^<updatecheck/^>^</app^> ^</request^> )>"%temp%\in32.xml" | |
(echo ^<?xml version="1.0" encoding="UTF-8"?^> ^<request protocol="3.0" ismachine="1" installsource="ondemand" dedup="cr"^> ^<hw physmemory="4" sse3="1"/^> ^<os platform="win" version="7.0" arch="x64"/^> ^<app appid="{8A69D345-D564-463C-AFF1-A69D9E530F96}" release_channel="stable" ap=""^>^<updatecheck/^>^</app^> ^</request^> )>"%temp%\in64.xml" | |
FOR /F "eol=; tokens=1,2* delims= usebackq" %%i in (`@powershell -Command " Invoke-WebRequest -Uri 'https://tools.google.com/service/update2' -Method POST -ContentType 'text/xml' -InFile '%temp%\in32.xml' -OutFile '%temp%\out32.xml' ; (([xml](gc '%temp%\out32.xml')).response.app.updatecheck|select @{n='DowloadLink';e={$_.urls.url.codebase[-1]+$_.manifest.packages.package.name}}).DowloadLink "`) do (@set Link32=%%i) | |
FOR /F "eol=; tokens=1,2* delims= usebackq" %%i in (`@powershell -Command " Invoke-WebRequest -Uri 'https://tools.google.com/service/update2' -Method POST -ContentType 'text/xml' -InFile '%temp%\in64.xml' -OutFile '%temp%\out64.xml' ; (([xml](gc '%temp%\out64.xml')).response.app.updatecheck|select @{n='DowloadLink';e={$_.urls.url.codebase[-1]+$_.manifest.packages.package.name}}).DowloadLink "`) do (@set Link64=%%i) | |
del /f /q "%temp%\in32.xml" "%temp%\in64.xml" "%temp%\out32.xml" "%temp%\out64.xml" "%temp%\chrome_links.txt" | |
(echo Win32 stable: %Link32%)>> "%temp%\chrome_links.txt" | |
(echo Win64 stable: %Link64%)>> "%temp%\chrome_links.txt" | |
clip < "%temp%\chrome_links.txt" | |
echo LINKS COPIED TO CLIPBOARD. | |
echo DOWNLOAD? | |
pause | |
IF EXIST %windir%\syswow64 ( powershell -Command "Start-BitsTransfer -Source '%Link64%' -Destination (New-Object -ComObject Shell.Application).NameSpace('shell:Downloads').Self.Path" ) ELSE ( powershell -Command "Start-BitsTransfer -Source '%Link32%' -Destination (New-Object -ComObject Shell.Application).NameSpace('shell:Downloads').Self.Path" ) | |
color 27 | |
timeout 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment