horta/zlib.install

Error with the arguments of DownloadFile() when using the first command in the readme.

Klemet opened this issue · 2 comments

Hello, there !

It seems that the first command indicated in the readme:

powershell -Command "(New-Object Net.WebClient).DownloadFile('https://git.io/JnHTY')"; ./install_zlib.bat; del install_zlib.bat

Always returns the following error, followed by others:

Cannot find an overload for "DownloadFile" and the argument count: "1".

From what I've read, it seems like the DownloadFile() function for the powershell needs two arguments: the link of download, and the name or the path of the file that will be downloaded.

This seems to be fixed in the second command given in the readme:

powershell -Command "(New-Object Net.WebClient).DownloadFile('https://git.io/JnHTY', 'install_zlib.bat')"; ./install_zlib.bat; del install_zlib.bat

Should there be a fix, then ? It took me time to understand that I should use the second command.

Whatever happens, thank you for your script ! It helped me a lot !

horta commented

Thank you for the feedback! I've changed the command line: it is shorter and avoid that call (which has been deprecated by Microsoft). Thanks!

Thank you so much for the fix :D ! I'm sure that it will help many !