Windows installation folders

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
gfioravanti2
Posts: 4
Joined: Fri Jun 19, 2009 8:49 pm

Windows installation folders

Post by gfioravanti2 » Sat Jun 20, 2009 12:51 am

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?

shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Contact:

Post by shadowslash » Sat Jun 20, 2009 1:19 am

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. Image
Parañaque, Philippines
Image
Image

paul_gr
Posts: 319
Joined: Fri Dec 08, 2006 7:38 pm

Post by paul_gr » Sat Jun 20, 2009 2:05 am

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
Last edited by paul_gr on Sat Jun 20, 2009 2:14 am, edited 1 time in total.

shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Contact:

Post by shadowslash » Sat Jun 20, 2009 2:14 am

Nicely said Image
Parañaque, Philippines
Image
Image

Post Reply