This question already has answers here:
Disabling the large file notification from google drive
(10 answers)
Closed 12 months ago.
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
When you try to manually download your file the browser looks like this:
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.
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.
Related
I am creating setup of large data approximetly 10 GB with NSIS Script and trying to create a single setup (exe). Its giving an Error -
Internal compiler error #12345: error mmapping file (xxxxxxxxxx, xxxxxxxx) is out of range.
Note: you may have one or two (large) stale temporary file(s) left in your temporary directory (Generally this only happens on Windows 9x).
Please tell me how to solve this issue ?
Is there any other way to create a setup for this kinda situation ?
NSIS installers are limited to 2Gb.
If you absolutely need it to be one file and you want to continue to use NSIS you have to append the data to the end of the generated setup. I'm not sure I would recommend that approach but it could work if the appended data is a zip file (or some other format with the header at the end) and you use one of the NSIS zip plugins to extract at run-time...
I have used https://sourceforge.net/projects/nsisbi/ instead of normal NSIS. It solved the problem.
I was using Silent Install Builder 5 and received this same error with a package installer that had LESS that 2 GB total. Once I determined that the NSIS compiler was to blame, I began experimenting with several possible solutions and here's what worked: I downloaded the newer NSISBI compiler from here https://sourceforge.net/projects/nsisbi/ and then did these 3 steps:
Go to C:\Program Files (x86)\Silent Install Builder 5 and renamed the default NSIS folder to a new name.
Copied the NSISBI folder into the C:\Program Files (x86)\Silent Install Builder 5 directory and renamed IT to NSIS.
Tries to compile some large packages above and just below 2GB and the first few tries I would get missing file errors in the Silent Install Builder 5 compiling box. No worries because the missing files are in the old NSIS folder, that's why y9u don't delete it.
Each time find the missing file error displays, find the missing files and copy them into the same folder location in the new NSIS folder. About 3 times you will do this until there are no more errors at all and you can then include the large files without generating the "internal compiler error #12345: error mmapping file xxxx is out of range." error message. NSISBI works!
I have written code with Inno-Setup to install a 2007 desktop MSAccess split data base and am including Access Runtime 2007. I have tried several variations of "running" the "AccessRuntime.exe" with the database but still get errors. Here are some of the constants and sections:
MyAppName "SSDExpress"
DefaultDirName=C:\{#MyAppName}
OutputDir= C:\{#MyAppName}
MyAppExeName "setup.exe"
[Files]
Source: C:pathtofiles\SSDExpress.accde; DestDir: "{app}"; Flags: ignoreversion
Source: C:pathtofiles\SSDExpress_be.accdb; DestDir: "{app}"; Flags: ignoreversion
Source: C:pathtofiles\AccessRuntime.exe; DestDir: "{app}"; Flags: ignoreversion
I have tried each of these 3 Run codes separately without success. Eachtime I have received errors related to the runtime.
1st try
[Run]
Filename:{app}\AccessRuntime.exe; Description:{cm:LaunchProgram,{#MyAppName}};Flags:
shellexec postinstall skipifsilent; Parameters: “””{app}\{#MyAppExeName}””/runtime”
2nd try
[Run]
Filename: Filename:{app}\{#MyAppExeName;Parameters: “/i””{app}\AccessRuntime.exe””/qn”
3rd try
[Run]
Filename: AccessRuntime.exe; Parameters: “/i””{app}\AccessRuntime.exe””/passive”
What am I doing wrong? (The code works to get all the files into the DefaultDirectory, but still I get messages that it cannot find the "AccessRuntime.exe" for the run code.)
Excuse my confusion in stating my problem. It may help to know that I have never written an installation script before. My only experience is using MS Access Packaging Wizard and I guess I assumed Inno was going to setup similarly.
To clarify what I want to do: I am trying to get a script to create a setup for users, which I can send to them and they can run to install a desktop MS Access 2007 database (SSDExpress), which will require Access Runtime to run if they don't already have access. Ideally I would like to include Access Runtime in the install package for them vs a download. So I want the Setup to install the program, which when they then access it, it will run as a stand alone desk top program. I want the FE to be separate (vs. PW accdr file) so that I can update program changes as needed.
I thank you in advance for your patience. Tricia
The "1st try" is correct, and the others incorrect. (Or at least the syntax is correct; you will have to discover for yourself what the correct parameters to pass to the runtime are.)
However two things to note:
This may have just been a side effect of posting it here, but your code includes "smart" quotes instead of standard quotes. You will have to change these to standard quotes for it to work.
You do not have a space between the filename and the /runtime parameter in the Parameters value.
The very first thing that you need to do is to try running it yourself from the command line with the parameters you think you need, and make sure that this works. Once you know that it works from the command line, it's just a simple matter of using the right syntax to get Inno to run it during the install.
We use Inno Setup(version 5.4.2) as the packaging tool to generate our installer. While upgrading our software from older version to current version,
we try to overwrite existing binaries/drivers. This is often leading to issues as some monitoring software like 'HP ArcSight Logger/Connector', 'SplunkUniversalForwarder' etc. are holding file handles on our binaries and casuing overwrite to fail. Our installer shows beolow popup message on encountering this issue each time.
"C:\Windows\System32\drivers\xxx.sys
An error occurred while trying to replace the existing file:
DeleteFile failed; code 5.
Access is denied.
Click Retry to try again, Ignore to skip this file(not recommended), or Abort to cancel installation"
Interestingly, even after above getting above pop-up, we were able to rename xxx.sys to xxx.sys.old manully. We used to suggest cusotmers to rename
xxx.sys to xxx.sys.old and 'Retry' the installation. After renaming, upgrade used to complete without any issues.
Questions
1) Is it possible to rename xxx.sys through program always, when we hit this issue.
2) Any process to reproduce the DeleteFile failed; code 5 issue?
Using the installer you can rename the existing file and install the new file using the correct file name with help from the windows registry.Remember to ask the user to reboot their computer to complete the install.Another option would be to either use the installer to rename the file and again using the window's registry to delete the unneeded file.
Window's registry allows you to delete or rename files on reboot as part of an install.
Reference to use of PendingFileRenameOperations:
http://support.microsoft.com/kb/181345
Example to rename from microsoft support:
The syntax used is (without quotes):
"\??\source file !\??\target file"
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
Value name: PendingFileRenameOperations Data type : REG_MULTI_SZ
Value data: \??\c:\temp\win32k.sys !\??\c:\winnt\system32\win32k.s
The same command can be used to delete a file as well although requires the use of nulls.
http://www.pcreview.co.uk/forums/pendingfilerenameoperations-delete-file-t1715654.html
Same example used to delete a file:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
Value name: PendingFileRenameOperations Data type : REG_MULTI_SZ
Value data: \??\c:\temp\win32k.sys\0\0\0
I hope this helps you!
I can't get windows 8 (release preview) to accept either the inf2cat or makecat approach described as solutions to the question at
What changed in the driver signature requirements for Windows 8?
unless I disable validation.
I am not signing these with any certificates at this point, just trying to get past the errors preventing the drivers from installing at all.
Windows 8 gives me a very nondescript error:
"A problem was encountered while attempting to add the driver to the store."
Looking in the event logs, there is nothing of use; only an informational entry from "Windows Error Reporting" indicating a PnPdriverimporterror.
When i use my original files with the cab files that don't match the inf, I get the error everyone else is listing:
The hash for the file is not present in the specified catalog file.
I have one .inf file that i need to generate a .cat for.
Perhaps I am doing something wrong. Ideas??
INF2CAT Approach
c:\win_xp_vista32_64>inf2cat /driver:"." /os:XP_X86,XP_x64,Vista_X86,Vista_x64,7_X86,7_X64,8_X86,8_X64
.......................
Signability test complete.
Errors:
None
Warnings:
22.9.10: usbser.sys in [drivercopyfiles.nt] is missing from [SourceDisksFiles] s
ection in \mchpcdc.inf; ok if file source is provided via LayoutFile in [Version
].
22.9.10: %driverfilename%.sys in [drivercopyfiles.ntamd64] is missing from [Sour
ceDisksFiles] section in \mchpcdc.inf; ok if file source is provided via LayoutF
ile in [Version].
Catalog generation complete.
c:\win_xp_vista32_64\mchpcdc.cat
MAKECAT approach
--- start of catalog.cdf file---
[CatalogHeader]
Name=mchpcdc.cat
ResultDir=.\
[CatalogFiles]
<hash>mchpcdc=.\mchpcdc.inf
---end of .cdf file ---
c:\win_xp_vista32_64>makecat catalog.cdf
These same files, w/ the cat from either approach install just fine in Windows 7.
I think this problem is to do with "windows driver signing enforcement". You can resolve this by disabling this option. Go through with below link:
http://tivadj-tech.blogspot.in/2012/09/certificate-check-error-when-installing.html
I just tested this on Windows 10 and 8 PRO now, to get this right, follow these steps:
1) From your Start menu, locate your DDK's "x64 Checked Build Environment" i.e. the custom DOS build screen. Right-click, run-as administrator...
2) Compile your source with the Build tools etc.
3) Go into your compiled code, and then create your test-certificate (you don't need to purchase one just yet, use your self-signed one created with the line below):
makecert -r -pe -ss PrivateCertStore -n CN=newhex.com(Test) NewhexTest.cer
The above means your certificate is called "newhex.com(Test)" and the generated file is "NewhexTest.cer"
4) Create / Edit your .CDF file which contains items about what your CAT file's contents.
5) Create your CAT file by executing:
makecat -v MyCDF.CDF
This should generate an un-signed CAT file that includes all files specified by your CDF.
6) Sign your CAT file as follows:
Signtool sign /v /s PrivateCertStore /n newhex.com(test) /t http://timestamp.verisign.com/scripts/timestamp.dll MyDriverWhatever.cat
This should result in a CAT file that is signed, but don't just install it, because your Windows can't trust Newhex's cert since it's not in the keystore, to fix this do:
7) Add your certificate to your private Key Store, remember this step MUST be done by an administrators access, otherwise you will get an error about (Keystore not found etc):
certmgr.exe -add NewhexTest.cer -s -r localMachine root
This should add into your keystore, Once done, you can then:
8) Go into your device manager, and add your new driver, you would get a warning but will be accepted and installed without the need to reboot with a forced (Don't check cert type account).
I tried this already and it works on Windows 10 and Windows 8 pro versions.
Kind Regards
Heider Sati
You are supposed to use inf2cat, not makecat, because you have an INF file.
You should work on addressing those warnings from inf2cat by fixing your INF file. Here is my INF file that uses usbser.sys and doesn't cause any warnings: https://gist.github.com/3647208
I was able to fix my INF file thanks to the advice from chinzei in the first post of this thread: http://www.microchip.com/forums/m488342-print.aspx
If you continue to have trouble, please edit your question to include the source of your INF file, or at least a link to the source.
I encounter the same problem and was able to install my driver with a TEST certificate using the instructions provided here:
http://msdn.microsoft.com/en-us/windows/hardware/gg487328.aspx
I am building an installer with inno setup that opens a link to a website after installation
Currently this looks like this:
[Run]
Filename: iexplore.exe; Parameters: http://doma.in/uri/ Verb: open; Flags: shellexec runasoriginaluser
This works fine, except that testing revealed that for example Kaskersky raises a warning that an unauthorized process (the setup) started an authorized process (internet explorer) that wants to access the encrypted passwords. Which could (of course) be a threat.
As I just want to open a browser to display the url it would be great to get rid of this message.
This are the options I evaluated so far
Unfortnuately there is no difference between Run Filename: iexplore and the Pascal Script Shell-Exec('open' ...)?
Perhaps it is somehow possible to pass the operating system a message to create a new instance of the webbrowser without creating it as a child process (i.e. without triggering the warning) of the setup.
As I am doing this for statistics it would be sufficient to call the winhttp library from within the setup. but this is not feasible, because the user could have a firewall installed (see HTTP POST request in Inno Setup Script).
Does it help to sign the setup? Would this suppress the warning?
in the end of your iss file:
[Code]
procedure CurStepChanged(CurStep: TSetupStep);
var
ErrCode: integer;
begin
if (CurStep=ssDone) then
begin
ShellExec('open', 'http://your.app.url/', '', '', SW_SHOW, ewNoWait, ErrCode);
end;
end;
The following works for me:
[Run]
Filename: "http://doma.in/uri/"; Flags: shellexec runasoriginaluser
What Mike Sutton pointed out was essentially right, but you need to add postinstall to the flags. That sets it to run after the setup has finished. In addition, you need Description to tell the setup finished screen what to display for the checkbox.
[Run]
Filename: "http://doma.in/uri/"; Flags: shellexec runasoriginaluser postinstall; Description: "Open the url."
You might also consider the unchecked flag if you want the option to be opt in instead of opt out.