Comments (2)
The problem you are experiencing is due to the fact that MSI architecture does not allow you accessing the session properties from the deferred actions (see (Deferred Actions)[https://github.com/oleg-shilo/wixsharp/wiki/Deployment-scenarios#deferred-actions]). The DeferredActions
and "Managed Setup/Setup Events" samples also shows the connection_string
use-case:
project.DefaultDeferredProperties += ",ConnectionString";
...
static void Msi_AfterInstall(SetupEventArgs e)
{
var connectionString=e.Session.Property("ConnectionString");
...........
}
from wixsharp.
@umeshone
You can also use CustomActionData
to retrieve properties inside deferred actions;
You need to declare action with Property
, that you can set this property in Session
where you need.
//action declaration
var installServiceAction = new ElevatedManagedAction( CustomActions.InstallService,
Return.check,
When.After,
Step.InstallFiles,
Condition.Always);
installServiceAction.UsesProperties = "CONNECTIONSTRING=[CONzNECTIONSTRING]";
And retrieve property using CustomActionData
//get property inside action
[CustomAction]
public static ActionResult InstallService(Session session)
{
CustomActionData data = session.CustomActionData;
var connectionString = data ["CONNECTIONSTRING"];
}
from wixsharp.
Related Issues (20)
- Externl Ui and Silent intallation HOT 7
- BA Installer with multiple MSI's Trouble HOT 4
- Repair not working HOT 25
- Add Custom WPF Dialog to Setup HOT 5
- Upgrade Project with BA Installer from .NET 4.8 to NET 8.0 or better HOT 5
- Problem installation in %AppData% Wix 4 WPF HOT 17
- Application folder is not removed after uninstallation HOT 9
- WixSharp NET Core UI Project HOT 3
- Write Filename with Path on InstallDialog HOT 24
- SetVersionFromFileId not working for relative path in Managed Project Dir HOT 3
- Azure pipeline build HOT 4
- If you enter the project name in Chinese, a question mark is displayed on the installation package HOT 6
- WixSharp-wix4.WPF 2.1.2 Can you smoothly upgrade to. NET8 HOT 2
- Install directory path changes when MSI is run second time through msexec command ADDLOCAL parameter HOT 1
- The installation directory value is incorrect HOT 2
- Dialog Data transfer problem HOT 2
- Add Ignore Errors a driver installer to Bundle HOT 1
- Allow specifying the Group name when adding a FirewallException HOT 2
- I would like to set a features directory path by the user in wix# ManagedUI HOT 3
- Execute CA which needed Powershell in Version 5.1 HOT 6
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.