Question Zdeněk Bartušek · Jul 25, 2019

Working with enviroment variables

Hello,

I've got similar question as I have mentioned here once. Itś about enviroment variables and getting their values into manifest.

Now a know, that I must use this method $system.Util.GetEnviron("")  but still if I try to use it it doesn't work. I need to set variable in bash.sh file and then get that value into manifest. If I try this in terminal it works only for system variables as you can see, but it shoul normally works for user variables to or not?

I've tried this this syntax several times and it was working until I've reinstall my Ensemble instantion:

<Var Name="SYSPath" Value='#{$system.Util.GetEnviron("SYSPath")}'/>

So is there any possibility how to get user variable by this method into install manifest?

I will be glad for every help, now I'm quite confused.

Thanks a lot.

Zdeněk

Comments

Eduard Lebedyuk · Jul 25, 2019

By default Ensemble service is run under System account, which does not have user environment variables.

You can either specify system variables or run Ensemble service from a user account.

0
Zdeněk Bartušek  Jul 25, 2019 to Eduard Lebedyuk

Yes ok, variant with system variables isn't worthit for me. But if i want run Ensemble under user account I should specify that in instalation is that right?

0
Jon Willeke  Jul 25, 2019 to Zdeněk Bartušek

You can also change it after installation by running cinstall setserviceusername in the bin directory.

0
Zdeněk Bartušek  Jul 25, 2019 to Jon Willeke

I've try it but i returns me Access denied error(318). I've tried Admin, Normal user, with password, without password, but nothing... :/

0
Eduard Lebedyuk  Jul 26, 2019 to Zdeněk Bartušek

It should be OS users, not Ensemble users.

0