Nadie se iba a imaginar que se había cambiado la aplicación por defecto del archivo VBS
No te olvides de dejar la línea como estaba para que al terminar borre ese archivo temporal.
Code: Select all
w '%output{' + InstallerPath + curlOutputTmp + '}Download completed with response code %{http_code}\n'
Code: Select all
if (fileExists(InstallerPath + curlOutput)) then
DeleteFile(InstallerPath + curlOutput);
curlOutputTmp := curlOutput + '.tmp';
if (fileExists(InstallerPath + curlOutputTmp)) then
DeleteFile(InstallerPath + curlOutputTmp);
sCommand := '-L -w "%output{' + InstallerPath + curlOutputTmp + '}Download completed with response code %{http_code}\n" --output "' + InstallerPath + curlOutput + '" --url "' + address + '" ' + '-H "Accept: text/html, */*" -H "Accept-Language: it" -H "DNT: 1" -H "Priority: u=0, i" -H "Sec-Ch-Ua: \"Not)A;Brand\";v=\"8\", \"Chromium\";v=\"138\", \"Google Chrome\";v=\"138\"" -H "Sec-Ch-Ua-Mobile: ?0" -H "Sec-Ch-Ua-Platform: \"Windows\"" -H "Sec-Fetch-Dest: Document" -H "Sec-Fetch-Mode: Navigate" -H "Sec-Fetch-Site: None" -H "Sec-Fetch-User: ?1" -H "Upgrade-Insecure-Requests: 1" -H "User-Agent: ' + curlUserAgent + '"';
Sleep(delayBetweenRequest);
Launch(curlPath, sCommand);
cnt := 0;
while ((not FileExists(InstallerPath + curlOutputTmp)) AND (cnt < 200)) Do
begin
cnt := cnt + 1;
Sleep(50);
end;
DeleteFile(InstallerPath + curlOutputTmp);
if (fileExists(InstallerPath + curlOutput)) then
begin
fileContent := TStringList.Create;
fileContent.LoadFromFile(InstallerPath + curlOutput);
[...]