Page 1 of 1
Windows installation folders
Posted: Sat Jun 20, 2009 12:51 am
by gfioravanti2
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?
Posted: Sat Jun 20, 2009 1:19 am
by shadowslash
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...
Code: Select all
on mouseUp
local myDocuments
put specialFolderPath("0x0005") into myDocuments
replace slash with backslash in myDocuments
answer myDocuments
end mouseUp
This is just a sample, you can remove the answer command. I just included it to show you to where it points to.

Posted: Sat Jun 20, 2009 2:05 am
by paul_gr
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
Posted: Sat Jun 20, 2009 2:14 am
by shadowslash
Nicely said
