<AppData> variable is wrong

Bugs, errors in the program.

<AppData> variable is wrong

Postby githomas » Thu Sep 13, 2012 1:41 pm

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
githomas
 
Posts: 4
Joined: Thu Aug 23, 2012 3:43 pm

Re: <AppData> variable is wrong

Postby Leo » Sat Sep 22, 2012 11:02 am

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
http://www.actualinstaller.com
Leo
Site Admin
 
Posts: 215
Joined: Fri Jan 22, 2010 12:40 pm

Re: <AppData> variable is wrong

Postby githomas » Sat Sep 22, 2012 11:56 am

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)
githomas
 
Posts: 4
Joined: Thu Aug 23, 2012 3:43 pm

Re: <AppData> variable is wrong

Postby Edward10 » Sat Nov 17, 2012 7:34 am

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%."
Edward10
 
Posts: 1
Joined: Sat Nov 17, 2012 7:23 am


Return to Bug Reports

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron