Go Back   TechArena Community > Software > Operating Systems
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , ,

Program folder on Windows Vista

Operating Systems


Reply
 
Thread Tools Search this Thread
  #1  
Old 23-02-2009
neekunj's Avatar
Member
 
Join Date: Dec 2008
Posts: 37
Program folder on Windows Vista

hi,
Everyone knows that Windows Vista is no longer advisable to keep the details of an application in the same folder of the executable. I seem to have identified a good place to keep local database, configuration files and other files read / written by the program, in a subfolder of "ProgramData" but I do not think that there is either an environment variable or a function that bullet APIs to this path. Yet InnoSetup allows you to install files using the default constant common appdata (). Someone knows how I can locate the program? Thanks in advance.
Reply With Quote
  #2  
Old 23-02-2009
Calvin K's Avatar
Member
 
Join Date: Apr 2008
Posts: 2,375
Re: Program folder on Windows Vista

Code:
 System.Environment.GetFolderPath
You can identify a large number of system folders, including:

Code:
  Environment.SpecialFolder.ApplicationData
namely that relating to application data. The folder is the user currently logged on.
Reply With Quote
  #3  
Old 23-02-2009
neekunj's Avatar
Member
 
Join Date: Dec 2008
Posts: 37
Re: Program folder on Windows Vista

But this returns me something else, namely:C: \ Users \ Arthur \ AppData \ ...

I was interested to get to C: \ Program Data ie to the folder that happens to the files installed by specifying the constant InnoSetup commonappdata ().
Reply With Quote
  #4  
Old 23-02-2009
Lillebror's Avatar
Member
 
Join Date: Apr 2008
Posts: 2,206
Re: Program folder on Windows Vista

With ALLUSERPROFILE get the All Users folder in Document and Settings. AppData instead provides you with the Application Data folder on the user currently logged on. Environ queries with the collection of environment variables that, theoretically, could not be set on another PC. Probably would have better security and better reliability by using the appropriate API to find the Special Folder: PI: Retrieving a Special Folder's location.Using the API you can get the Application Data folder in the All User, then common to all users, with the constant CSIDL_COMMON_APPDATA.
Reply With Quote
  #5  
Old 23-02-2009
Solomon's Avatar
Member
 
Join Date: May 2008
Posts: 2,564
Re: Program folder on Windows Vista

It depends on what data do you refer: ALLUSERSPROFILE \... is the folder for the data common to all users, eg. If you use a local DB, you can put it there. If instead we talk about personal data of AppData, then you should use, or in the My Documents folder of the current user. The difference between the two is that AppData is hidden to the user, and you can get, unless you know how to change the option to make it visible. In the documents, however, the user can see the folder and files that you install. In short, depends on the type of access to the files you want to give to you. Note that in the constant InnoSetup commonappdata () is an internal name, that name does not exist in Windows, as there is the C: \ ProgramData. InnoSetup in the guidance indicates that the constants refer to the same folder: userappdata () & () commonappdata The path to the Application Data folder.
Reply With Quote
Reply

  TechArena Community > Software > Operating Systems


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads for: "Program folder on Windows Vista"
Thread Thread Starter Forum Replies Last Post
64bit program wants to install in x86 folder Doroteo Operating Systems 3 28-11-2009 05:39 AM
Can't run 16-bit program from temp folder on XP SP3 sr100101 Operating Systems 4 08-07-2009 10:18 AM
Vista x86 program folder not showing in directory MrCager Vista File Management 2 05-10-2008 04:49 PM
Program Files Folder in two partitions Rulleri Vista File Management 4 27-08-2008 07:50 AM
Pls. update me on Vista's Program Files folder Johan Vista Administration 1 02-04-2008 06:11 AM


All times are GMT +5.5. The time now is 11:34 AM.