Codename K
Posts: 471
Joined: Fri Jan 29, 2010 3:04 pm

Get files inside MSI without installing?

Hello,

Is there a way to extract the files inside the MSI without installing?

:?:
K
Catalin
Posts: 6592
Joined: Wed Jun 13, 2018 7:49 am

Re: Get files inside MSI without installing?

Hello,

Yes, this is achievable by using a command line as it follows:

Code: Select all

msiexec /a PathToYourMSI TARGETDIR=PathWhereYouWantToExtractTheFiles
Hope this helps!

Regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Codename K
Posts: 471
Joined: Fri Jan 29, 2010 3:04 pm

Re: Get files inside MSI without installing?

Thanks.

Can this be done when using a custom action or when a button is clicked in the installer?
K
Catalin
Posts: 6592
Joined: Wed Jun 13, 2018 7:49 am

Re: Get files inside MSI without installing?

Hello,

Yes, this is achievable by using a custom action. But please keep in mined that it is impossible for two Windows Installer processes to run at the same time. So, to make this work, you have to place your custom action after "Finish Dialogs Stage" in "Custom Actions" page.

For example, you can create a .BAT file with the following command line:

Code: Select all

msiexec /a PathToMsi TARGETDIR=PathToExtractedFiles
Then you can add this .BAT file as a temporary file in the "Files and Folders" page and then use a "Launch File" custom action, which you will need to place after "Finish Dialogs Stage". Also, do not forget to tick the "Do not remove the file when setup ends" option for your added temporary file, otherwise you will get an error because temporary files are deleted during "InstallFinalize" standard action.

Hope this helps!

Regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Codename K
Posts: 471
Joined: Fri Jan 29, 2010 3:04 pm

Re: Get files inside MSI without installing?

Hello,

Is it possible to extract from an EXE installer created with Advanced Installer? Because, when the EXE installer is opened it creates three files with these extensions, msi, cab, aiui. I tried the following command on the msi,
msiexec /a PathToMsi TARGETDIR=PathToExtractedFiles
But it did not work. I use a surface theme. It only opened the installer with the theme not properly set. For example, the buttons did not use the surface theme images. Also this shows the Install button after clicking the Next button. But Install button did not do anything.

basically, is it possible to extract the files and folders given in the EXE installer out without installing the installer?
K
Catalin
Posts: 6592
Joined: Wed Jun 13, 2018 7:49 am

Re: Get files inside MSI without installing?

Hello,

In order to extract the file contained by your .EXE, you can simply use a command line as it follows:

Code: Select all

"YourExeSetup.exe" /extract
That way, the files will be extracted next to your .EXE setup.

Hope this helps.

Regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Codename K
Posts: 471
Joined: Fri Jan 29, 2010 3:04 pm

Re: Get files inside MSI without installing?

This command,
"YourExeSetup.exe" /extract
extracted three files with these extensions, msi, cab, aiui. The MSI did not extract the files inside when this command is used,

Code: Select all

msiexec /a PathToMsi TARGETDIR=PathToExtractedFiles
As mentioned in previous post, I use a surface theme. It only opened the installer with the theme not properly set. For example, the buttons did not use the surface theme images. Also this shows the Install button after clicking the Next button. But Install button did not do anything.
K
Catalin
Posts: 6592
Joined: Wed Jun 13, 2018 7:49 am

Re: Get files inside MSI without installing?

Hello,
As mentioned in previous post, I use a surface theme. It only opened the installer with the theme not properly set. For example, the buttons did not use the surface theme images. Also this shows the Install button after clicking the Next button. But Install button did not do anything.
This happens because you are using the "Surface" theme, which is not compatible with Windows Installer. That is why the "Install" button is doing nothing and the opened setup had not its theme properly set.

I am afraid that the only workaround to this is to use a standard Windows Installer interface (theme) --> rebuild your project --> extract the msi out of the exe --> extract the files out of the MSI.

Kind regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Codename K
Posts: 471
Joined: Fri Jan 29, 2010 3:04 pm

Re: Get files inside MSI without installing?

I understand. Thanks
K
Catalin
Posts: 6592
Joined: Wed Jun 13, 2018 7:49 am

Re: Get files inside MSI without installing?

You're always welcome!

Regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”