Comments (4)
hiho, i had same issue. AFAIK you have to add your public property to MSI in Installer. If you use simple ManagedProject
add it like project.AddProperty(new Property("MODE","Empty")), should work. But for BA Installer you have to add it as well for MsiPackage. Unlikwise, MSI want always all properties denified before, only then you can assign value to it at runtime.
from wixsharp.
hiho, i had same issue. AFAIK you have to add your public property to MSI in Installer. If you use simple ManagedProject add it like project.AddProperty(new Property("MODE","Empty")), should work. But for BA Installer you have to add it as well for MsiPackage. Unlikwise, MSI want always all properties denified before, only then you can assign value to it at runtime.
from wixsharp.
@oleg-shilo @Torchok19081986 Can someone point me in the right direction ?
from wixsharp.
morning, hm, strange. You can try , just for example, in CA and add it in session["MODE"] = "Whatever". See ouput in beforeinstall event - first option.
second option - Create ManagedAction CA , when.before, check.ignore, Condition.NotInstalled, Step.InstallSequence. Add also MessageBox with session["MODE"] in CA. If messagebox appears with your assign value, something wrong in your Installer.
you can also try add in project defaultdefferedproperties = ",MODE".
following code i used long time ago, for me it works.
new ManagedAction(CustomActions.SetProperty, Return.ignore, When.Before, Step.InstallFinalize, Condition.NOT_Installed)
{
UsesProperties = "MYPROPERTY"
},
custom action should looks following
[CustomAction]
public static ActionResult SetProperty(Session session)
{
// Get the value from the session
string radioButtonValue = session["MYPROPERTY"];
// Log the value for debugging purposes
session.Log("Radio button value: {0}", radioButtonValue);
// Based on the radio button value, set the property
if (radioButtonValue == "Whatever1")
{
session["MYPROPERTY"] = "Whatever1";
}
else if (radioButtonValue == "Whatever2")
{
session["MYPROPERTY"] = "Whatever2";
}
else
{
// Handle unexpected values if necessary
session["MYPROPERTY"] = "Unknown";
}
return ActionResult.Success;
}
from wixsharp.
Related Issues (20)
- set Wix Toolset version for WixSharp HOT 5
- Duplicate component IDs are added when shortcuts are added HOT 4
- Fonts are not installed for all users HOT 4
- Custom Behavior for "X" button in the title bar HOT 3
- Cannot build .net 8 example project HOT 8
- Tags are wrong in git HOT 2
- "Complete" feature gets added automatically & after installation of MSI, an empty feature folder installed even if it is not selected HOT 14
- installDir variable erased depending on ManagedProject structure HOT 5
- Shortcut "Target" produces unexpected results for many supported WiX environment constants HOT 4
- (Race condition?) Issue with form load order (difficult to reproduce) HOT 5
- > since I know now root cause of my issue, how can I include sub folders in my new Files constructor or somewhere in Files HOT 3
- Dotnet tool should not be relied on for wixsharp. HOT 1
- Info: SFXCA: Failed to create temp directory. Error code 5 HOT 1
- How to execute rollback imeediately If i click on cancel after install execute sequence has started ? HOT 3
- Overview of which SetupEventHandler is fired on which type of project HOT 2
- Wix Woolkit 3.14.1 not working "SFXCA: Failed to create temp directory. Error code 5" HOT 1
- MSI build is failing with failed to add file - Even path is available HOT 7
- How to see in WixSharp project which Wix toolkit version is being used AFTER it has been created? HOT 3
- Restart Office apps after installation HOT 23
- Build issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wixsharp.