retrok
Posts: 2
Joined: Thu Aug 21, 2014 12:08 pm

Large installation takes extremely long

Hey,

I have a large installation (~70GB) with lots of components and I use the option "place files unpacked with the MSI database next to it".
(I wanted to create an installer for some of my games with their registry entries so I don't have to install them seperately, just as a personal side project)

Naturally, the installation takes a long time, but I have the problem that the progress bar stops at around 20% with the status "Updating component registration" (or "Copying new files..." if I activate "Mark components in this feature as 'Do not register with Windows Installer'" on the Organization page).


I looked at my verbose log, here are the last few lines:
Aktion gestartet um 13:31:30: ProcessComponents.
MSI (s) (E0:BC) [13:31:30:074]: Note: 1: 2205 2: 3: MsiPatchCertificate
MSI (s) (E0:BC) [13:31:30:074]: LUA patching is disabled: missing MsiPatchCertificate table
MSI (s) (E0:BC) [13:31:30:074]: Resolving source.
MSI (s) (E0:BC) [13:31:30:074]: Resolving source to launched-from source.
MSI (s) (E0:BC) [13:31:30:074]: Setting launched-from source as last-used.
MSI (s) (E0:BC) [13:31:30:075]: PROPERTY CHANGE: Adding SourceDir property. Its value is 'G:\Source\'.
MSI (s) (E0:BC) [13:31:30:075]: PROPERTY CHANGE: Adding SOURCEDIR property. Its value is 'G:\Source\'.
MSI (s) (E0:BC) [13:31:30:075]: PROPERTY CHANGE: Adding SourcedirProduct property. Its value is '{96465C6B-7AD1-445D-9000-6D240F5987A7}'.
MSI (s) (E0:BC) [13:31:30:075]: SOURCEDIR ==> G:\Source\
MSI (s) (E0:BC) [13:31:30:075]: SOURCEDIR product ==> {96465C6B-7AD1-445D-9000-6D240F5987A7}
MSI (s) (E0:BC) [13:31:30:075]: Determining source type
MSI (s) (E0:BC) [13:31:30:076]: Source type from package 'Setup.msi': 0
MSI (s) (E0:BC) [13:31:30:077]: SECREPAIR: Hash Database: C:\Windows\Installer\SourceHash{96465C6B-7AD1-445D-9000-6D240F5987A7}
MSI (s) (E0:BC) [13:31:30:077]: SECREPAIR: SourceHash database file already exists. Deleting it.
MSI (s) (E0:BC) [13:31:30:082]: Note: 1: 2262 2: SourceHash 3: -2147287038
MSI (s) (E0:BC) [13:31:30:091]: SECREPAIR: New Hash Database creation complete.
MSI (s) (E0:BC) [13:31:30:099]: SECREPAIR: CryptAcquireContext succeeded
After that it just spams "MSI (s) (E0:BC) [13:31:43:893]: SECREPAIR: CryptAcquireContext succeeded" over and over.


Then I looked what the Installer did with the programm ProcMon and it repeats:
13:27:01,7429618 msiexec.exe 46632 RegQueryKey HKLM SUCCESS Query: HandleTags, HandleTags: 0x0
13:27:01,7429765 msiexec.exe 46632 RegOpenKey HKLM\Software\Policies\Microsoft\Cryptography SUCCESS Desired Access: Read
13:27:01,7429901 msiexec.exe 46632 RegSetInfoKey HKLM\SOFTWARE\Policies\Microsoft\Cryptography SUCCESS KeySetInformationClass: KeySetHandleTagsInformation, Length: 0
13:27:01,7429985 msiexec.exe 46632 RegQueryValue HKLM\SOFTWARE\Policies\Microsoft\Cryptography\ForceKeyProtection NAME NOT FOUND Length: 144
13:27:01,7430081 msiexec.exe 46632 RegCloseKey HKLM\SOFTWARE\Policies\Microsoft\Cryptography SUCCESS
13:27:01,7430205 msiexec.exe 46632 RegQueryKey HKLM SUCCESS Query: HandleTags, HandleTags: 0x0
13:27:01,7430337 msiexec.exe 46632 RegOpenKey HKLM\Software\Microsoft\Cryptography\DESHashSessionKeyBackward NAME NOT FOUND Desired Access: Read
13:27:01,7430446 msiexec.exe 46632 RegCloseKey HKLM\SOFTWARE\Microsoft\Cryptography\Defaults\Provider\Microsoft Enhanced RSA and AES Cryptographic Provider SUCCESS
with different files.
(Sometimes there are some other entries, but most of the time it repeats what I posted above)

So the installation doesn't freeze, just the progress bar stops and installation takes extremely long .


I am not using any Encryption, Trial, Serial Key, etc, is it normal that the installer even uses "CryptAcquireContext"?
Is it possible to deactivate this?


The installation would probably take days, which isn't really practical.

Any help is appreciated :)
Daniel
Posts: 8268
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Large installation takes extremely long

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

Please keep in mind this is the Windows Installer behavior. The installation process takes more time during "ProcessComponents" and "InstallFiles" standard action because during these actions Windows Installer will register all of your installation components, respectively copying the installation resource file on target machine. Therefore when having a very large amount of installation files these actions will take a long time to finish. Also, I don't think you can workaround over this behavior. However, what you can try is to use our options from "Install Parameters page -> Minimize Installation Time section".

Regarding the "CryptAcquireContext" function, I'm not so sure why Windows Installer calls it during installation, but I think this may happen when your installation setup is digitally signed.

If you have any questions let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
retrok
Posts: 2
Joined: Thu Aug 21, 2014 12:08 pm

Re: Large installation takes extremely long

Hey,
thanks for your reply.

It's no problem that the installation takes a long time, but the "CryptAcquireContext" seems a bit odd. It takes 1-2 hours before the installer writes the first file, before that all I can see in the log is "MSI (s) (E0:BC) [13:31:30:099]: SECREPAIR: CryptAcquireContext succeeded".

I'm already using the options from "Minimize Installation Time ", but that didn't help with the problem.

If I could skip that "CryptAcquireContext" phase everytthing would be fine, as soon as the installer starts writing files, the installation doesn't take that long.

Thanks for any help :)
Daniel
Posts: 8268
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Large installation takes extremely long

Hello,

Can you please send us the .AIP (project file) and (if possible) a verbose log of the installation to support at advancedinstaller dot com so we can investigate them?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
moconnell
Posts: 1
Joined: Fri Oct 31, 2014 12:20 pm

Re: Large installation takes extremely long

Don't know if you've discovered it already but this is related to http://support.microsoft.com/kb/2918614
Unfortunately they've fixed an issue with it that stop installations but not this issue that simply stalls them. I have a similar issue where our installer has 800 'loose' files to hash. This issue is worst when installing from a very slow network drive we have to use internally, are you doing the same?
The only option is to remove the update at the moment, but some people won't be able to since it's a security update. :?
Daniel
Posts: 8268
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Large installation takes extremely long

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

We were not aware about such issue triggered by the "KB2918614" Windows patch. Thank you for sharing this with us. Hopefully the info will be useful for future users facing with the same behavior.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dan
Posts: 4524
Joined: Wed Apr 24, 2013 3:51 pm

Re: Large installation takes extremely long

Hi,

Advanced Installer follows Microsoft's guidelines for MSI package creation when creating components.

However, when handling packages with a large number of components where installation speed is critical, Advanced Installer offers support to easily manage component creation rules.
Starting with version 21.2 version of Advanced Installer, you have the flexibility to select what option works best for you and reduce the number of components.
Component Policy.png
Component Policy.png (30.34 KiB) Viewed 9276 times
In the context of Windows Installer (MSI), several standard actions are involved in processing components during software installation, maintenance, and removal.

Here are the key standard actions:
  • CostFinalize - Calculates the disk space requirements for all features and components selected for installation.
  • InstallValidate - Ensures that all components can be installed correctly by checking for any potential conflicts or missing prerequisites.
  • PublishComponents - Registers the components with the system, making them available for use by other applications and updates.
Each of these actions plays a critical role in ensuring that components are correctly processed, installed, registered, and configured on the target system.

You can check the number of components in the Component table within the Table Editor view, which shows the actual number of components and how their number changes based on your Component Policy option selection.
Component Table.png
Component Table.png (102.26 KiB) Viewed 9276 times

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”