<AppData> variable is wrong

Bugs, errors in the program.
Post Reply
githomas
Posts: 4
Joined: Thu Aug 23, 2012 3:43 pm

<AppData> variable is wrong

Post by githomas »

If I open regedit and fetch the key

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders

and get the value AppData, I get the string:

C:\Users\Gail_2\AppData\Roaming

When I fetch this same string on the Actual Installer System Variables I get the string:

C:\Users\Gail\AppData\Roaming

This is a serious error that makes your product almost useless!

Gail Thomas
Leo
Site Admin
Posts: 455
Joined: Fri Jan 22, 2010 12:40 pm

Re: <AppData> variable is wrong

Post by Leo »

Actual Installer uses a standard Windows API function to retrieve this value.

But you may use your custom variable to get proper value.
Go to the System\Variables page and add the following:

Code: Select all

Variable Name: <MyAppData>
Root Key: HKEY_CURRENT_USER
Subkey: Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
Value Name: AppData
Value Type: STRING
Default Value: <AppData>
Now you may use this variable <MyAppData> in your project.
Leo,
Actual Installer Team
https://www.actualinstaller.com
githomas
Posts: 4
Joined: Thu Aug 23, 2012 3:43 pm

Re: <AppData> variable is wrong

Post by githomas »

Unfortunately, I have already tried what you suggest. In fact I tried this before I made my original post. On my windows 7 I have 3 users
ADMIN (has the AppData value Gail)
Gail (has the AppData value Gail_2)
Joe (has the AppData value Joe)

I does not matter which user I'm logged in as, I always get the same value Gail

Other installers I've used in the past and some I'm testing now, do not have this problem (they have other issues)
Edward10
Posts: 1
Joined: Sat Nov 17, 2012 7:23 am

Re: <AppData> variable is wrong

Post by Edward10 »

If you add %APPDATA% to any user or system environment variable by using the following method, %APPDATA% may not be resolved to the appropriate user application data folder:

* Right-click My Computer, and then click Properties.
* On the Advanced tab, click Environment Variables.
* Add a new user or system environment variable named PATH. Set the Variable value entry to %APPDATA%.
* Apply the settings.

If you then start a command session (Cmd.exe) and check the PATH environment variable by using the set path command, %APPDATA% may not be expanded to the appropriate user application folder. Instead, you see "%APPDATA%."
Post Reply