PDA

View Full Version : Special folders



NewsArchive
03-12-2013, 02:08 AM
Friedrich,

I've made an install that uses CSIDL_COMMON_APPDATA (C:\Program Data
typically) as the destination for my demo data. There is a folder
structure under that. Tested and everything works.

Another tester is running XP and he's getting "path not found" errors.
Is the special folder not recognized under XP? If so, I'll need to test
the OS to either use Vista and newer special folders or use the create
folder function depending.

--

Russ Eggen
RADFusion International, LLC

NewsArchive
03-12-2013, 02:09 AM
Should be OK on XP, I'd think it would go to
\doc & settings\all users\appdata


Sean H

NewsArchive
03-12-2013, 02:09 AM
> I've made an install that uses CSIDL_COMMON_APPDATA (C:\Program Data
> typically) as the destination for my demo data. There is a folder
> structure under that. Tested and everything works.
>
> Another tester is running XP and he's getting "path not found" errors.
> Is the special folder not recognized under XP? If so, I'll need to test
> the OS to either use Vista and newer special folders or use the create
> folder function depending.

Russ,

I'm not sure how you are doing it, but you have to use the predefined CSIDL
functions to obtain the address of the folder.

On Vista onward, the path is:
C:\ProgramData

But on XP the path is:
C:\Documents and Settings\All Users\Application Data

You can see details here:
http://www.clarionproseries.com/propathhelp/index.html?selectingacsidl.htm

But you never want to set these via hard code.

For COMMON appdata it is %_CSIDL_COMMON_APPDATA% (note the underscores)

If you use the predefined CSIDL script variables in SB to set the path, it
should be working.

IOW, set your path as:

%_CSIDL_COMMON_APPDATA%\YourFolderName

Does that help?

Charles


--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.clarionproseries.com - ProScan, ProImage, ProPath and other Clarion
developer tools!
www.ezchangelog.com - "Free ChangeLog software to manage your projects!"
www.setupcast.com - "A revolutionary new publishing system for software
developers - enhanced for SetupBuilder users!"
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms - Now with PNG support!
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------

NewsArchive
03-12-2013, 02:10 AM
Hi Russ,

What Charles and Sean said. All Windows versions with Shell and Shlwapi DLL
V5.0 (or better) support the file-system directory %_CSIDL_COMMON_APPDATA%
that contains application data for all users.

Friedrich

NewsArchive
03-12-2013, 08:38 AM
That's where I finally found things. That XP test found a whole host of
issues. This is why we test stuff <g>

--

Russ Eggen
RADFusion International, LLC

NewsArchive
03-12-2013, 08:39 AM
I think you are two steps behind - did all that already <g>

--

Russ Eggen
RADFusion International, LLC

NewsArchive
03-12-2013, 08:39 AM
Hi Russ,

BTW, when you display %_CSIDL_COMMON_APPDATA% from a simple "Display Message
Box" in the install, does the displayed folder exist? And is it writable?

Perhaps something is "broken" on this XP machine <g>

Friedrich

NewsArchive
03-13-2013, 01:24 AM
Actually, SB8 performed flawlessly upon further review. I had one line
of code in my app that totally screwed this up. Now fixed. <blush>

--

Russ Eggen
RADFusion International, LLC

NewsArchive
03-13-2013, 01:25 AM
> Actually, SB8 performed flawlessly upon further review. I had
> one line of code in my app that totally screwed this up. Now
> fixed. <blush>

Perfect! Thanks for the update :-)

Friedrich

NewsArchive
03-13-2013, 01:25 AM
That doesn't necessarily mean that the folder exists.


Jeff Slarve
www.jssoftware.com
www.twitter.com/jslarve
I'll search help files & Google for you.

NewsArchive
03-13-2013, 01:26 AM
>
> That doesn't necessarily mean that the folder exists.
>

Yes, that's correct. But as I understand it, there is a folder structure
under CSIDL_COMMON_APPDATA. So if Russ creates that folder structure and
the "parent" (CSIDL_COMMON_APPDATA) does not already exist, it will be
created.

Friedrich

NewsArchive
03-13-2013, 01:26 AM
And it was created as expected. I don't need to change anything in my
script. My code made some bad assumptions.

--

Russ Eggen
RADFusion International, LLC