We have an application that needs to read/write to files and folders on the user's hard drive.
We originally had these files saving to the C:/Program Files folder, but some users are running into permissions problems.
Where are you guys saving your application files?
Windows installation folders
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 344
- Joined: Tue Feb 24, 2009 6:14 pm
- Contact:
If you mean the installer for the program then I use the program files too but if you mean just the normal read/write from within the program then why not try the current user's "My Documents"?
Take a look at my script below...
This is just a sample, you can remove the answer command. I just included it to show you to where it points to. 
Take a look at my script below...
Code: Select all
on mouseUp
local myDocuments
put specialFolderPath("0x0005") into myDocuments
replace slash with backslash in myDocuments
answer myDocuments
end mouseUp

With Vista, the rule of not writing files to a folder inside the "Program Files" directory has been tightened up. The rules were there in XP but not enforced.
On XP, I write into user/Application Data/appName
On Vista, I write files into the hidden folder user/programData/appName
specialfolderpath("Home") on Windows will give you some usable paths...
On XP, this gives me:
C:/Documents and Settings/Paul/
On Vista, this gives me:
C:/Users/Paul/
You can also use CSIDL values with specialfolderpath to install user files to a single user or all users...
put specialfolderpath("0x001a")
returned C:/Users/Paul/AppData/Roaming
put specialfolderpath("0x0023")
returned C:/ProgramData
I'd also read http://www.sonsothunder.com/devres/revo ... env007.htm
Paul
On XP, I write into user/Application Data/appName
On Vista, I write files into the hidden folder user/programData/appName
specialfolderpath("Home") on Windows will give you some usable paths...
On XP, this gives me:
C:/Documents and Settings/Paul/
On Vista, this gives me:
C:/Users/Paul/
You can also use CSIDL values with specialfolderpath to install user files to a single user or all users...
put specialfolderpath("0x001a")
returned C:/Users/Paul/AppData/Roaming
put specialfolderpath("0x0023")
returned C:/ProgramData
I'd also read http://www.sonsothunder.com/devres/revo ... env007.htm
Paul
Last edited by paul_gr on Sat Jun 20, 2009 2:14 am, edited 1 time in total.
-
- Posts: 344
- Joined: Tue Feb 24, 2009 6:14 pm
- Contact: