From: Dennis on
Hi,

I'm developing using Access XP Office on Windows 7. My users are running
Access XP and Access 2007 on Widows XP, Vista, and Windows 7.

I not quite in which forum this question belongs, but since it came up in a
form, I'm asking the question in this forum.

I have "blob" type files (.tiff, .jpg, etc.) that were stored in different
sub-directories under C:\Documents and Settings\<User Name>\My
Documents\....." Rather than store the file in the database, I store the
full path and file name in my database.

As you know MS, "in their infinite wisdom" , decided to change the
"Document" directory structure on Vista and Windows 7 to "C:\Users\<User
Name>\Documents\....".

Fortunately, the first user to when to Vista had not used the "blob" files
very much, but they had a few. So I had to go in by hand and change the path
names. However, it did point out a flaw in how I am storing the path name.

I need to change how I store my path names so I don't have to manually
convert them (or write code to convert them) when other users upgrade to
Vista or Windows 7.

Any suggestions?

Do I have to parce the path name and store it in pieces so that I can
reassemble the correct file name name depending upon which OS I'm on or is
there a better way.

Thanks,


Dennis
From: Douglas J. Steele on
For what it's worth, it really wasn't appropriate to hardcode "C:\Documents
and Settings\<User Name>\My Documents\....." under XP: for instance, on my
XP machine, my My Documents folder is located on the D drive.

Use the SHGetSpecialFolderLocation API, as outlined in
http://www.mvps.org/access/api/api0054.htm at "The Access Web". The
specific invocation you'll want is fGetSpecialFolderLocation(CSIDL_PERSONAL)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Dennis" <Dennis(a)discussions.microsoft.com> wrote in message
news:765C977E-E833-4E36-802F-4A9B91213F10(a)microsoft.com...
> Hi,
>
> I'm developing using Access XP Office on Windows 7. My users are running
> Access XP and Access 2007 on Widows XP, Vista, and Windows 7.
>
> I not quite in which forum this question belongs, but since it came up in
> a
> form, I'm asking the question in this forum.
>
> I have "blob" type files (.tiff, .jpg, etc.) that were stored in different
> sub-directories under C:\Documents and Settings\<User Name>\My
> Documents\....." Rather than store the file in the database, I store the
> full path and file name in my database.
>
> As you know MS, "in their infinite wisdom" , decided to change the
> "Document" directory structure on Vista and Windows 7 to "C:\Users\<User
> Name>\Documents\....".
>
> Fortunately, the first user to when to Vista had not used the "blob" files
> very much, but they had a few. So I had to go in by hand and change the
> path
> names. However, it did point out a flaw in how I am storing the path
> name.
>
> I need to change how I store my path names so I don't have to manually
> convert them (or write code to convert them) when other users upgrade to
> Vista or Windows 7.
>
> Any suggestions?
>
> Do I have to parce the path name and store it in pieces so that I can
> reassemble the correct file name name depending upon which OS I'm on or is
> there a better way.
>
> Thanks,
>
>
> Dennis

From: Dennis on
David,

Thanks for the info. I will be reading those articles. More to learn!


Dennis
From: Dennis on
Douglas,

Your Comment: For what it's worth, it really wasn't appropriate to hardcode
"C:\Documents and Settings\<User Name>\My Documents\....." under XP: for
instance, on my XP machine, my My Documents folder is located on the D drive.

My Response: I see you point and I agree. However, after reading your
response I see where I left out an important piece. I'm still learning for
excuse the faux pas.

I did not "hardcode" my paths. My users create or download their documents
into their directory and then "attach" the documents to their access
database. I use file FileOpen routine that I found on one of the MVP website
(I forget whose). This routine access the standard windows File Open window.
The user navigates to the directory in which their documents is stores and
selects the document. The routine returns a path and a file name which I
then store in my database.

I guess at that point I am going to have to parse the path that is returned
and store it in pieces. This seems to be a pretty "ugly" way to do it. I
was hopping there is a better way to do this.


Dennis
From: Dennis on
Doug,


Your comment: Note that some of the defined folder locations have changed
writability by non-admins between WinXP and Vista/Win7 (e.g., \All
Users\AppData, previously world writable, now writable only by admins, so
it's no longer a place to put your front end on a machine shared by multiple
users -- instead each user has to have their own copy, or you have to set
permissions manually.

My Response:
Normally I put my front end in my own directory directly of the drive
letter. Is that a bad way to do it? I've done it this way to avoid the
multi-use issue. I guess the only issue then is all users have access to the
app, no just the desired user. But I've only had this issue pop up once.
But your point is well taken.

What is your advice for where to place the front end software?


Dennis