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

Sponsored Links



Program folder on Windows Vista

Operating Systems


Reply
 
Thread Tools Search this Thread
  #1  
Old 23-02-2009
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
Member
 
Join Date: Apr 2008
Posts: 3,512
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
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
Member
 
Join Date: Apr 2008
Posts: 3,289
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
Member
 
Join Date: May 2008
Posts: 4,081
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
Tags: , ,



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
File or folder is using by another program in windows 7 Niyunki Ji Operating Systems 6 14-03-2011 03:57 PM
Installed software folders are not showing in windows vista program folder ZiGmA4321 Windows Software 4 19-01-2011 06:30 PM
Best Windows Vista Optimization program first-born Windows Software 5 16-11-2010 06:50 AM
The action can't be completed because the folder or a file in it is open in another program error in windows 7 Its_Shaili Operating Systems 3 13-08-2010 01:15 PM
A program to scan Windows Vista CLONEOPS Operating Systems 3 14-10-2008 02:46 PM


All times are GMT +5.5. The time now is 06:49 PM.