We created our MSI Installer using WIX Toolset. and we need to customize the installer dynamically according to user specific files e.g Themes and Dialogues. We use this link to add Add Cabinet File to Installer but i can't read it. We want to know the best place to read the Cabinet file along with its files(customization files). Shall we do this in a custom action or what is the best place to do that? Also, we need a sample code that we can follow to achieve this task? note:- Our Cabinet file will contain a lot of files(txt files, Images and so on)
1
There are 1 best solutions below
Related Questions in C#
- How to call a C language function from x86 assembly code?
- What does: "char *argv[]" mean?
- User input sanitization program, which takes a specific amount of arguments and passes the execution to a bash script
- How to crop a BMP image in half using C
- How can I get the difference in minutes between two dates and hours?
- Why will this code compile although it defines two variables with the same name?
- Compiling eBPF program in Docker fails due to missing '__u64' type
- Why can't I use the file pointer after the first read attempt fails?
- #include Header files in C with definition too
- OpenCV2 on CLion
- What is causing the store latency in this program?
- How to refer to the filepath of test data in test sourcecode?
- 9 Digit Addresses in Hexadecimal System in MacOS
- My server TCP doesn't receive messages from the client in C
- Printing the characters obtained from the array s using printf?
Related Questions in .NET
- file download method in visual studio 2017
- Repository manager receives the wrong connection string in .net core
- MongoDb not connecting C#
- The current .NET SDK does not support targeting .NET Core 6.0. Brand new WPF Project VS Community 2022 17.9.5
- Why Scanning GSI on DynamoDb doesnt work as fast as expected when using CONTAINS?
- Are "blittable types" really unmanaged types for StructLayout Sequential
- Failed to fetch dynamically imported module on Blazor JS Interop
- Problem to upload several images per one request
- Implementing Azure AD B2C Authentication in .NET 8 Blazor Project (RenderMode: InteractiveAuto)
- Stripe connect payout - throws exceptions
- 'IOException: The cloud file provider is not running', when trying to delete 'cloud' folder
- Azure Application Insights Not Displaying Custom Logs for Azure Functions with .NET 8
- Convert C# DateTime.Ticks to Bigquery DateTime Format
- Socket.io nodejs server .NET connection
- Producer Batching Service Bus Vs Kafka
Related Questions in WIX
- Wix bundle of third party exe and new msi cant figure out detect conditions
- Getting 'Error writing to file' during WiX Toolset upgrade when changing installation scope
- Unable to format string in desired format - WiX
- wix toolset radio button condition
- How to Add custom dialog to Wix v4
- How to invoke UAC(Elevation shield) Prompt while trying to open bootstrapper bundle exe in WIX
- How do I use heat.exe with Visual Studio extension?
- Is anybody using WiX Toolset v5.0.0-rc.1?
- WixToolset v4 - Installation with scope "PerUser" fails when package NetFx462Redist is used
- Wix not writing to HKCU when run with a user needing admin login?
- WIX project Radio button value usage
- WinAPI / WIX - How to detect if the MSI installer is running on ARM64 or x86?
- Detect re-installation on rollback
- Update to Wix 3.14 from 3.11 get error MSB4181: The "MSBuild" task returned false but did not log an error
- Wix: Error LGHT0091: Duplicate symbol 'Property:WIX_IS_NETFRAMEWORK_472_OR_LATER_INSTALLED' found
Related Questions in WINDOWS-INSTALLER
- Wix bundle of third party exe and new msi cant figure out detect conditions
- create MSI that can be installed in console per user and per machine
- Invoke-command works only when any user is logged (msi install)
- Windows installer silently skips over component marked as 'Local'
- Customizing the Behavior of the BrowseDlg in WiX to Use a Custom Dialog for Invalid Directories
- Unable to format string in desired format - WiX
- Creating a Desktop Version of a Web Application (NextJS TypeScript Golang Echo)
- wix toolset radio button condition
- Creating an Installer Wizard
- Using msiexec on unattend.xml as SynchronousCommand but it run as asynchronous
- How to protect MSI installer digital signature from tampering
- I finished writing the code for an Android application, and it was in Python kivy, and while converting it to exe, this problem appeared
- Windows Installer Issue: Files Not Replaced After Major Upgrade - Seeking Assistance and Clarification
- WinAPI / WIX - How to detect if the MSI installer is running on ARM64 or x86?
- 'The cabinet file media1.cab required for this installation is corrupted and cannot be used ' in dowloading Node.js
Related Questions in DTF
- How to embed and run .dtf file from an electron app
- Why is vbs able to find the INSTALLLOCATION when C# using both DTF and MSI API cannot?
- DTF Orchestration instance struck in "Pending" Status
- How do I trap Cancelling of a long-running deferred DTF Custom Action?
- Wix DTF custom action is intermittently failing with Rundll32 error
- Deferred CustomAction in System context get access denied
- MSI: Show message box in UI phase of installation
- WIX custom action: use dllimport
- WIX : Adding and Reading cabinet file to msi Installer programatically with DTF to allow dynamic customization of installers
- Wix Returning the error "No CA or UI entry points found in module" but [CustomAction] is used in dll
- Get component code using WiX DTF
- Using DTF to install msi package
- Issue faced during uninstall MSI using its Product Code in c#(DTF)
- Too Many Events Using DTF InstallLogModes
- Adding cabinet file to msi programatically with DTF (wix)
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I'm assuming that, since you followed that link (to my own question none the less) You now have the files embedded in the msi as a new cabinet file with a MediaID
Warning: the code in this reply, is all untested for now
Notice that an msi is basicly just a database, that can be queried using SQL like statements. The cabfiles are found embedded in the database, in the _Streams table, and can be extracted to their original cab file format.
You can verify this using ORCA, and 7zip.
The solution to the SO question you referred to, was designed to "replace" files. So a dummy file was used in the msi build, and the placement was configured in wix. then after msi building, the file table was modified, to change the reference from the original cab files generated by wix, to a new cab file injected. In this way the dummy files where orphaned, but still embedded in the msi.
This approach is fine when one knows what files will be customized for each user, and when all users will have the same folder/file structure, independently of customizations.
I assume you have a different number of files for each user, or different folder structure for each user, since you doesn't just copy that solution. To achieve this several msi table edits are required.
Directory Table: you will need to create directories in this table, if they where not already defined by your wix configuration.
Something like this should allow you to insert new directories:
From here on, everything must be repeated for all files in the new cab file
** Component Table **
you will need to create a component that controls your file, so that it can be installed/uninstalled by msiexec.
where:
Guid.NewGuid()..CreateFolder Table: Usually only required if you need to create an empty folder, so we will ignore this for now, as you can dump a readme file or something in the folders..
File Table This table tells msiexec where to locate the file in your msi, and what version the file is in, so it knows if it needs to copy it, update it, ignore it, etc..
The sequence number is used to tell the msi where to locate the file, a Media Table relates sequences to cab files, or external medias..
the code is also just an insert into, statement:
and then the magic part, which we will have to use later:
FeatureComponent Table This table is used to add this to the feature tree, making it possible for the user, to add or remove this feature. All components should belong to a feature.
Media Table the code you referred to already adds a cabinet file to the msi, and creates an entry in the media table:
So this should already be set up for you.. if someone else stumbles upon this answer, I copied the relevant snippet here, to show how the seuquence numbers are made for the new cab file.
so the file table have a sequence number larger than what was already in the msi, but below what can be found in the new media you have already added.
Note: It is very important that the files in the cab file are in the same order as the sequence numbers, otherwise msiexec can throw an error of not being able to find the file.