How to write to ProgramData?

Got a problem you cannot solve? Try here.
Post Reply
rodrigo.onclick
Posts: 14
Joined: Wed Mar 23, 2011 11:48 am

How to write to ProgramData?

Post by rodrigo.onclick »

Good afternoon,

Following the principles of Windows 7 Logo Program, we should not store application data in the Program Files folder. So, I need to write some folders and files in "ProgramData".

How should I proceed with the project installer to have access to "ProgramData"?

I made an attempt using $MYLOCALAPPDATA$, but this I generated the files in C:\Users\<UserName>\AppData\Roaming, which does not give rights to another user on the same machine to access the files.

In addition to "ProgramData", we would have another alternative to the application data being seen by all users of the machine?

Thanks,

Rodrigo Duarte
OnClick Sistemas
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: How to write to ProgramData?

Post by giaviv »

Dear Rodrigo,

How about just installing to the explicit path c:\ProgramData?
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
rodrigo.onclick
Posts: 14
Joined: Wed Mar 23, 2011 11:48 am

Re: How to write to ProgramData?

Post by rodrigo.onclick »

Dear Giaviv,

The folder ProgramData system is specific to record data shared application. My application can not be installed per user. Data must be in a common folder for all users.

Write to "ProgramData" is not a requirement if there is another folder with the same purpose, attend tranquilly.

Thanks,

Rodrigo Duarte
OnClick Sistemas
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: How to write to ProgramData?

Post by giaviv »

Dear Rodrigo,

Maybe do an online research and see where other programs are writing their data to?
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
rodrigo.onclick
Posts: 14
Joined: Wed Mar 23, 2011 11:48 am

Re: How to write to ProgramData?

Post by rodrigo.onclick »

For knowledge, I could use the folder ProgramData following steps:
- In Target Folders, right click, Add System Folder
- select the option "System -> Application Data Directory"
- check the "If Applicable, use the commom folder shared by all users"

Thanks,

Rodrigo Duarte
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: How to write to ProgramData?

Post by giaviv »

Thanks Rodrigo!
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply