title: Inno Setup - Fully resolve an environment variable that contains another variable
body: <p><strong>Edit</strong> - this issue appears to be Windows 7 and Vista due to a bug <a href="https://social.technet.microsoft.com/Forums/windows/en-US/6cb3e0f5-f401-4c73-a756-666565a4d762/expanding-environment-variables-in-windows-7-and-missing-properties-under-right-click-computer-?forum=w7itproinstall" rel="nofollow noreferrer">(see here - Same issue reported)</a></p>
  
  <p><strong>Edit2</strong> - I might be running into a similar issue users wee with PATH (I am not using PATH but same result - <a href="https://superuser.com/questions/27826/why-cant-windows-handle-an-environment-variable-in-path/27828#27828%22An%20unanswered%20post%20on%20a%20similar%20issue.%22">Unanswered question with similar issues</a></p>
  
  <p>I have an Inno Setup script that uses an environment variable to locate a folder and delete the contents. When I try to expand the variable without elevated privileges  I get this:</p>
  
  <p>TEST_USER=%APPDATA%\PROG\USER_DATA  (this is set in Windows)</p>
  
  <p>If I run this as Admin (or change privileges to admin) I see:</p>
  
  <p>TESTUSER=c:\users\username\appdata\roaming\PROG\USER_DATA </p>
  
  <p>Googling %APPDATA% issues shows others have this issue, usually they hit this when used in PATH, something to do with the path not being set before it is requested.</p>
  
  <p>I was hoping to avoid a complex routine of checking with pos if the return value contains %appdata%. But I think that might be my only solution.</p>
  
  <p><a href="https://i.stack.imgur.com/IYmif.png" rel="nofollow noreferrer">cmd.exe - Example of the issue</a></p>