Registry editor in Unattended mode


I am changing values in the registry editor using invoke code. It is working fine in development and UAT environment in an attended mode. But in the production environment, the invoke code activity is getting executed but the registry values are not getting changed.

Will registry editor not work in an unattended bot? Is this issue relates to Session 0 in windows?
If not, what can be the resolution for this!

Thanks in Advance,
Konda Sai Charan Goud