Hello
Thank a lot for that question, it is great to be able to discuss the content of a note with its creator !
There is something that seems unclear to me either in the old and the new version (may be because English is not my native language)
SAP service is running under SAPService<SID> user I thought it should inherit from the environment of that user (but no SAP specific env. var are set for that user) but it is not the case.
Does the note means that when the SAP instance is started the variables defined under the registry key HKEY_LOCAL_MACHINE\SOFTWARE\SAP\<sid>\Environment are append (or replace) the existing environment variables set from the ones defined for account <SID>adm ?
I've done some testing and it seems that only the env. variables defined for <SID>adm account are effective.
What is wrong with my test ?
Create an env var for sapserviceSID:
FOR /f %u in ('wmic useraccount where name^= ^'sapserviceSID^' get sid ^| find "S-"') do set USID=%u
Reg add "HKU\%USID%\Environment " /v TEST /t REG_SZ /d "SAP_SVC"/f
Stop/start services + SAP instance
Test with set command in prog RSBDCOS0 => var TEST is not set
Create an env var for SAP env. reg key:
Reg add "HKLM\SOFTWARE\SAP\SID\Environment" TEST /t REG_SZ /d "SAP_ENV" /f
Stop/Start services + SAP instance
Test with set command in prog RSBDCOS0 => var TEST is not set
Create an env var for <SID>adm
Reg add "HKU\Environment" TEST /t REG_SZ /d "USR_ENV" /f
Stop/Start service + SAP instance
Test with set command in prog RSBDCOS0 => var TEST is set to USR_ENV
Best regards