使用 cURL 下载的 EXE 无法执行

使用 cURL 下载的 EXE 无法执行

我一直在尝试编写一个脚本,用于安装 Docker Desktop 以及其他软件。每当我通过 cURL 下载 Docker Desktop 并尝试执行该程序时,Windows 都会弹出This App Can't Run on This PC。通过浏览器运行从网站下载的程序可以正常工作。两个文件的二进制大小完全相同,精确到字节。兼容模式也不起作用。

尝试获取文件哈希值得到以下结果:

PS C:\Users\Antonios> Get-FileHash

cmdlet Get-FileHash at command pipeline position 1
Supply values for the following parameters:
Path[0]: C:\Users\Antonios\Desktop\github-repos\EZCompile-PHP\windows\dockerDesktop
Path[1]: C:\Users\Antonios\Downloads\Docker Desktop Installer.exe
Path[2]:

Algorithm       Hash                                                                   Path
---------       ----                                                                   ----
SHA256          EDF5CB80E3E9AC230FDD1C2BD283D5AE846E659FBF45B3BD3D4233F06B3F497C       C:\Users\Antonios\Downloads\D...

相关内容