Quantcast
Channel: wixsharp Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1354

New Post: Change Windows Service properties Through CustomAction

$
0
0
Hi,

I've managed to pass properties from External UI to the MSI using Custom Actions.
(I checked it with MessageBox):

session.CustomActionData["ServiceName"] = session.CustomActionData["NAMEKEY"];
MessageBox.Show(session.CustomActionData["ServiceName"]);


The way I create my property is:
p = new Property("ServiceName", "TestTest");

I also add the property name to UsesProperties
m.UsesProperties = "ServiceName";

and then I add it to the project:
project.Properties = new Property[]
{
       p
};

The way I set the name for the service is:
Name = "[ServiceName]"

When I tried to set property directly from session I get errors:
session["ServiceName"] = session.CustomActionData["NAMEKEY"];
Errors:
When I do deffered its says I am not allowed access properties
When I do immediate it says There is no such a key.

So the issue is, my service name keeps default value instead of a new value that I set inside CustomAction.

Any suggestions would be much appreciated!

Thank you,
Eduards Brown

Viewing all articles
Browse latest Browse all 1354

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>