PDA

View Full Version : SB using CSIDL_COMMON_DOCUMENTS



NewsArchive
08-02-2010, 01:34 PM
C6 using tps files
SB7 dev

I used the CSIDL_COMMON_DOCUMENTS to build the paths in ini files in
SB. One points to a shared local folder and another ini file points to
a shared local network computer shared global drive that also had a SB
install. This all works in XP as I have read it should. Here is an
example that is used in a workstation Win 7 box where I have the
problem

C:\Documents and Settings\Users\Public\Documents\LocalDataFolderNam e
this is in an ini file and its purpose is to point to the local shared
folder where all users on this win7 box have data. This ini file never
gets changed after the sb install. An ini file in this shared folder
points to the global data.

this did not allow me to change the ini file in the shared sub folder
on the win 7 box because it probably did not see it

\\LapDog7\Users\Public\Documents\LocalDataFolderNa me
this does work and the ini file was changed in the shared folder on
the win7 box

pointing to the global data files on an xp computer
\\xpname\Documents and Settings\All Users\Documents\FolderShareName
does not work. maybe I am just assumming and that is my mistake. But I
thought this worked in XP.

pointing to the data files on an xp computer from the win7 box
\\xpname\FolderShareName
does work.

this FolderShareName is the share name created in SB7 on the xp box
and maybe when creating the share name that is all thats needed. If so
thats not the way I thought it worked with 2 xp boxes before. I have
used the unc path to point to my files in XP for testing(Ithink, it
was more than 2 days ago). But, I always mapped the drive of the
computer from the workstation pointing to the data files.

If this is the way it should be then I need to change the way I create
info in my ini files on a win7 box with my SB install and use
CSIDL_COMMON_DOCUMENTS for creating folders only because it will give
me the wrong path for my ini files.

Since I only have 1 xp box does a xp workstation pointing to a xp
shared folder also need this short path
\\xpname\FolderShareName
the same as win 7?


Jimmy

NewsArchive
08-02-2010, 01:35 PM
I'm not sure I understand... perhaps you could clarify a bit, Jimmy?

C:\documents and settings is not used on Windows 7 computers. Profiles are
inside c:\users.

Networks can make things a bit more complicated.
The attached screen shot (using the clarionmag CSIDL tool
http://www.clarionmag.com/cmag/v9/v9n03vistaini.html I think Arnor has a
free tool on icetips.com that also enumerates them) shows some of the CSIDLS
relevant to my domain user account on a Vista workstation on a Server
2003Active Directory domain with folder redirection enabled.

It might be a good idea to run one of those CSIDL tools using the user
account(s) you're interested in and see how Windows resolves the ones you're
interested in.

Jane

NewsArchive
08-02-2010, 01:37 PM
CSIDL_COMMON_DOCUMENTS in my SB install on the W7 box gave me

C:\Documents and Settings\Users\Public\Documents

I used it to create folders which is correct. I see to use it for a
path is incorrect.

I want the same local data for any user. I think I need to change my
ini's and local data for my program to the app data CSIDL instead of
the common doc. Do you agree? I remember something was still strange
with your results in the Vista articles. I think it had to do with
sharing data across the network.

So is Vista also C:\users or is that just Win7? At this time my Vista
computer is elsewhere to do any testing with.

I do have the global data working between win7 and xp on my local
network with the w7 box the workstation. I did not know in Win7 the
correct path to the shared folder on the XP box was
\\xpname\SharedFolderName and not \\xpname\Documents and Settings\All
Users\Documents\SharedFolderName

Your SB help file is very usefull.

Jimmy

NewsArchive
08-02-2010, 01:38 PM
Jimmy,

C:\Documents and Settings\Users\Public\Documents

You can perfectly use that path for your files - UNDER a new folder
name of course
ie : C:\Documents and Settings\Users\Public\Documents\MyApp

--
Merci
Cordialement - Best regards
Jean-Pierre GUTSATZ
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com Certified by Microsoft : "Works with Vista" & "Works
with Windows Server 2008"

NewsArchive
08-02-2010, 01:38 PM
In my c6 program in win7 if I set my file path to
C:\Documents and Settings\Users\Public\Documents\MyApp
it does not work.

If I set my file path to
C:\Users\Public\Documents\MyApp
or
\\computername\Users\Public\Documents\MyApp
it works

Jimmy

NewsArchive
08-02-2010, 01:39 PM
Jimmy,

You MUST change your app "settings" to folow the path you select
(whatever it is) otherwise it will never work ;)

ie tell your app where to look for your data files and store that info
in registry HKCU (NEVER HKLM) or in an ini file (never in program
files)

--
Merci
Cordialement - Best regards
Jean-Pierre GUTSATZ
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com Certified by Microsoft : "Works with Vista" & "Works
with Windows Server 2008"

NewsArchive
08-02-2010, 01:40 PM
The only problem was with Win7. I did not know the proper path
configuration. I used the CSIDL_COMMON_DOCUMENTS to create folders but
used it also for a path which was wrong.

Jimmy Rogers

NewsArchive
08-02-2010, 01:41 PM
The Making App Data UAC Safe.chm has given me all the info I need to
continue.

Thanks

Jimmy

NewsArchive
08-02-2010, 01:42 PM
> The Making App Data UAC Safe.chm has given me all the info I need to
> continue.

Jimmy,

Glad to know you found it useful.

Of course, a lot of Clarion community related companies and individuals
provide a number of products and resources that are referenced in the CHM
version of the App Data UAC Safe that make it a good reference document for
many.

Product Description - App Data UAC Safe, MFG - Encourager Software
Internet Link - http://profileexchanges.com/blog/?p=120

David

--
From David Troxell - Encourager Software
Microsoft Forums NNTP Bridge - Instructions to use
http://profileexchanges.com/blog/?p=397

NewsArchive
08-02-2010, 01:42 PM
Thank you for your work and for the response to help me in the future.

Jimmy

NewsArchive
08-02-2010, 01:43 PM
> Thank you for your work and for the response to help me in the future.

Jimmy,

You're very welcome!

Of course, my job is mostly Editor - pull all the references together - the
heavy lifting is done by quite a talented crew of companies and individuals
that offer the products and resources.

As I see trends, better ways of documenting, new and updated products,
resources, then the CHM is updated - always dated so you'll know if you
have the latest when I post another update is available.

I just went through the Code Sign Certificate process (again) recently (I
choose the 3 year offer), so I may have some hints soon to add in that
area.

David

--
From David Troxell - Encourager Software
Microsoft Forums NNTP Bridge - Instructions to use
http://profileexchanges.com/blog/?p=397