We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

dupree
Posts: 1
Joined: Tue Apr 10, 2007 10:52 pm
Location: Chino, CA
Contact: Website

Directory creation locations in Vista

Hello, I am just starting to look at vista and rework my applications. The first thing I noticed was that I have to move my data directories out of the application directory...

In the Files and Folders area in the Project Definition section I created a new directory "Animal Reproduction Systems" under "Application Data" and added the folder "Data" which holds my database files.

My application uses java so I also wanted to redirect the error stream to a file in the "Animal Reproduction Systems" directory I created above. Under Java Products Virtual Machine tab, I selected this directory and gave it the name statuslog.txt so the whole line under "Error Strean to:" reads
[Animal_Reproduction_Systems_DIR]statuslog.txt

Now everythings seems to work so I built my installer and tested it on a vista machine.

After I had run my application I looked at the filesystem and found the following:

A new directory "Animal Reproduction Systems" found in c:\Users\myusername

A data directory inside of the above directory. This is what I expected to see.

I also found a second "Animal Reproduction Systems" directory under c:\Users\myusername\AppData\Roaming and inside this directory, I found the data directory as above.

Why are there two different directories created? I noticed that the c:\Usersmyusername\Animal Reproduction Systems\Data directory has the original copies of the database and do not reflect and changes I made when the vista was run.

The copy in the Roaming directory has updated database files and the "Animal Reproduction Systems" directory has the statuslog.txt file.

How can I setup advanced installer so all of these files are in the same directory?

Thanks,

Doug

ADDED LATER: I have been looking at some docs on Vista and it looks like all of these files should be in the Roaming directory according to MS's idea of where things go.

I dug the following out of the Managing Roaming User Data guide:
Windows uses the Roaming folder for application specific data, such as custom dictionaries, which are machine independent and should roam with the user profile. The AppData\Roaming folder in Windows Vista is the same as the Documents and Settings\username\Application Data folder in Windows XP.
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

The "Application Folder" (AppDataFolder property) from "Files and Folders" page is resolved to "C:\Users\UserName\AppData\Roaming" under Windows Vista. So your application should write data in this folder.

Read more about "AppDataFolder" property here:
http://msdn2.microsoft.com/en-us/library/aa367565.aspx

Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”