could you please advise how to create a dynamic path in a Config file, so that robot takes from there the correct path no matter what computer name is? For example if robot runs on computer CMXXX, the path would be "C:\Users\CMXXX\Desktop", if on computer ABXXX, the path would be "C:\Users\ABXXX\Desktop". I know that this is possible by assigning the value directly to variable, like "C:\Users"+environment.username+"CMAZP\Desktop" but how to create the same in a Config file and refer to it?
Can you try System.Environment.ExpandEnvironmentVariables method?
For eaxmple, System.Environment.ExpandEnvironmentVariables("%USERPROFILE%") returns c:\Users\[UserName] System.Environment.ExpandEnvironmentVariables("%COMPUTERNAME%") returns your computer name.
So you can write %EnvironmentVariable% in your config file, then extract it using this method.