0

Here is my Inno Setup code. The "Scripts.rar" file that i wanna download is about 1 GB. If i put a file that's 25MB, it's working. With this file instead, it just proceeds installing the offline files, skipping the download of the big "Scripts.rar".

I need to download really big files with this setup. They are about 20 files, each one with a 1-3GB size. InnoSetup is putting me a huge limitation.

#pragma include __INCLUDE__ + ";" + ReadReg(HKLM, "Software\Mitrich Software\Inno Download Plugin", "InstallDir")
#pragma include __INCLUDE__ + ";" + "c:\lib\InnoDownloadPlugin"
#include <idp.iss>

[Code]
      idpAddFile('https://drive.google.com/uc?export=download&confirm=hoYh&id=1UnIIBtjhDqtNuSKyeF5ce0grVlTnIIyz', ExpandConstant('{tmp}\Scripts.rar'));
      //Download after "Ready" wizard page 
      idpDownloadAfter(wpReady);
    end;

[files]
Source: "C:\Users\Dedric\Desktop\New folder (3)\GTA Compton Compiler\UnRAR.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall
; NOTE: Don't use "Flags: ignoreversion" on any shared system files


[Run]
Filename: "{tmp}\UnRAR.exe"; Parameters: "x ""{tmp}\Scripts.rar"" ""{code:GetDirPath}"""
Filename: "{code:GetDirPath}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

1 Answers1

2

When you try to manually download your file the browser looks like this:

Google

It states:

Google Drive can't scan this file for viruses.

Scripts.rar (311M) is too large for Google to scan for viruses. Would you still like to download this file?

This is the reason it won't download. It requires user interaction to agree to download the file without performing a virus scan.

If there is any way to get around that, well it would be a Google Drive matter. But it is probably against their policies to ignore displaying the warning. This is not a Inno Setup issue.

Update

A quick search on the internet revealed this article where it says:

Right-click Download anyway and click Inspect Element.

Link

It also says:

Add the "https://drive.google.com" before "/uc?"

So your link becomes:

https://drive.google.com/uc?export=download&confirm=z8LQ&id=1UnIIBtjhDqtNuSKyeF5ce0grVlTnIIyz

Use that link in your script.

Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
  • If you take a look at the URL in the question, I'm pretty sure that this is exactly what OP did. And it does not work. Neither OP's nor your URL work for me. It's probably unique to the user. – Martin Prikryl Apr 14 '20 at 14:08
  • @MartinPrikryl Do you mean "it does not work if I add it as a file to download in Inno Setup"? Or the link does doesn't work? You can verify the latter by right-clicking the "Download anyway" button and comparing the URLs. Are they different? – Andrew Truckle Apr 14 '20 at 14:19
  • @MartinPrikryl I have compared my link and his and they are exactly the same. But, the link in the comments (which is the one I clicked) takes you to `https://drive.google.com/uc?export=download&confirm=no_antivirus&id=1UnIIBtjhDqtNuSKyeF5ce0grVlTnIIyz` which is not the same link. – Andrew Truckle Apr 14 '20 at 14:21
  • @MartinPrikryl Also, I based my answer on your comments and the link you provided in the comments. So I did not realise he was already doing it the correct way. I leave my answer anyway. :) – Andrew Truckle Apr 14 '20 at 14:23
  • OP has edited the link in the question. Original link had `confirm=no_antivirus`, now it is `confirm=hoYh`. But neither works for me. – Martin Prikryl Apr 14 '20 at 14:29
  • @MartinPrikryl Mine showed `confirm=z8LQ&id` So mine and his are NOT identical. Why don't you try it. What is your `confirm` value? Different? – Andrew Truckle Apr 14 '20 at 14:30
  • 1
    Or course, I've tried all the URLs. I didn't mean that they are identical. I've meant that you both got them the same way. The point is that the Google Drive obviously generates a session-specific "confirm" parameter. So you both have tried the same approach (leading to different "confirm" parameters). And in both cases, it led to a URL that cannot be used in an installer. – Martin Prikryl Apr 14 '20 at 14:44
  • @MartinPrikryl Yes The `confirm` token expires after a while. So the link I had no longer works for me and I have to generate a new one. Which implies he has to display the link in a invisible browser and scrape the token value or URL somehow. – Andrew Truckle Apr 14 '20 at 14:45
  • hold on so, i have to create the link everytime because the token dies after a while? i need a permanent link. That sucks – Da'Vion Young Apr 14 '20 at 16:55
  • mediafire works. The problem is with G Drive, but i actually bought space in G Drive. i don't wanna migrate to mediafire – Da'Vion Young Apr 14 '20 at 16:56
  • Not much you can do is there my friend? Find another way to share your file. Eg. from your own domain space or an alternative cloud service. – Andrew Truckle Apr 14 '20 at 16:57
  • Have you checked [this](https://stackoverflow.com/a/47581609) answer? – RDR Apr 07 '21 at 15:58