Hello,
I am running exe (console app C# project).How can I get session?
This might be a little bit more complicated then.
I thought you were using a
C# custom action (DLL)
This is still possible to achieve, though.
First of all:
Should I set property inside installer?
No, the
ProductLanguage property is automatically set according to the setup's language. For more information, please see the article I have linked above.
Here is how you could proceed in your scenario:
- create a .TXT file containing the language of your setup through a
"Text file update" operation, e.g.:
- txtFileUpdate1.png (112.34KiB)Viewed 11342 times
- txtFileUpdate2.png (30.67KiB)Viewed 11342 times
The above should create, after the installation, a file similar to this:
- txtFileUpdateAfterInstallation.png (59.61KiB)Viewed 11342 times
- read, from that .TXT file, the code and based on it, display the message in the required language - this should be done from your custom action's code
This will work if your custom action is scheduled after the
"Add resources" action group and with its'
"Execution Time" set to
"When the system is being modified (deferred)".
The reason behind this is the fact that the text file update operation executes on a component install, which executes during the
"Add resources" action group.
Hope this helps!
Best regards,
Catalin