Page 1 of 1

Can't find a constant for %LOCALAPPDATA%

Posted: 08 Feb 2017, 13:22
by -johndoe
As the title says, i can't find a constant for %LOCALAPPDATA% (which is %username%/AppData/Local on Windows Vista and above and Documents and Settings/default user/Local Settings/ for Windows XP and below). I can easily make it install into appdata/local with a workaround like this;

Code: Select all

<appdata>\..\Local\desireddirectory
but it's not gonna work for winxp. any ideas?

Re: Can't find a constant for %LOCALAPPDATA%

Posted: 03 Apr 2019, 20:03
by WahooDevColton
This is also important to us. Are there any plans to support a <LocalAppData> variable? Also, has anyone else found a different workaround for this?

edit:
I found another workaround of adding my own variable using the
HKEY_CURRENT_USER\Volatile Environment::LOCALAPPDATA registry
and using "<AppData>\..\Local" as the default value, but I still feel like a native <LocalAppData> variable would be warranted.

p.s. I also don't know if my new workaround would work for windows xp either

Re: Can't find a constant for %LOCALAPPDATA%

Posted: 05 Apr 2020, 21:14
by LokimotiveUK
Can you please post a screenshot of what your variable looks like? I have no idea what to put where. I've been trying a solution for hours on what should be a straightforward thing. Nothing is simple eh? fml.

Any help would be appreciated. I just need to get my program installed in AppData/Local.

Re: Can't find a constant for %LOCALAPPDATA%

Posted: 08 Apr 2020, 15:21
by Soner
There is no path constant available for the local appdata folder in InstallForge. However, we working on a new release which will support this.

Re: Can't find a constant for %LOCALAPPDATA%

Posted: 09 Apr 2020, 12:02
by Bergdoktor
WahooDevColton wrote: 03 Apr 2019, 20:03 edit:
I found another workaround of adding my own variable using the
HKEY_CURRENT_USER\Volatile Environment::LOCALAPPDATA registry
and using "<AppData>\..\Local" as the default value, but I still feel like a native <LocalAppData> variable would be warranted.

p.s. I also don't know if my new workaround would work for windows xp either
thanks for the hint. managed to do it your way as a workaround as well. to clarify what I did check out the two screenshots below

https://imgur.com/a/ymFU4ff