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[]
{
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
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