From: Karl E. Peterson on
expvb wrote:
> "Karl E. Peterson" <karl(a)mvps.org> wrote ...
>> For curiosity sake, I just fired up a Win95 (950b; build 1111) VM that's
>> *almost* pure. The API returns these folders:
>>
>> CSIDL_APPDATA: C:\WINDOWS\Application Data
>> CSIDL_LOCAL_APPDATA: C:\WINDOWS\Local Settings\Application Data
>> CSIDL_COMMON_APPDATA: C:\WINDOWS\All Users\Application Data
>
> You must have installed something that updated the shell, or you are using a
> different function.

My code uses SHGetFolderPathA if it's available (exported from shfolder.dll),
otherwise it calls SHGetPathFromIDList and SHGetSpecialFolderLocation. I'm not sure
what I may have installed. As I said, one VM I tried it with still had IE3!

Add/Remove programs shows:
- Command Prompt Here Power Toy
- Cygnus Hex Editor
- Send To Extensions Power Toy
- TextPad 4.6
- Tweak UI
- Virtual Machine Additions
- WinZip

On the ME system, the only thing I've installed are the Virtual Machine Additions.

Hmmm, looking on the 95 systems, the shfolder.dll files on both have an internal
version stamp of 5.00.2919.200 and the product name resource is "Microsoft(R)
Windows (R) 2000 Operating System". I have no idea where that originated! Here's
the list of supposed possibilities:

http://support.microsoft.com/dllhelp/default.aspx?l=55&fid=96426

And definitely none of those were installed on that VM. Now I'm really puzzled.
Definitely time to build a from-scratch VM.
--
..NET: It's About Trust!
http://vfred.mvps.org


From: Bill McCarthy on

"Karl E. Peterson" <karl(a)mvps.org> wrote in message
news:%23HQdRRiYJHA.4424(a)TK2MSFTNGP05.phx.gbl...
>
> Well, no, I don't have a totally "clean" Win95 machine to verify that on.

If you're using VPC you should look at using differencing discs. Makes it
easy to rollback.
Admittedly these days hard disc space is so cheap I tend to just copy entire
VPCs as soon as I create them.

From: expvb on
"Eduardo" <mm(a)mm.com> wrote in message
news:gihc2j$ot5$1(a)news.motzarella.org...
> "Karl E. Peterson" <karl(a)mvps.org> escribi� en el mensaje
> news:e83hj8iYJHA.552(a)TK2MSFTNGP06.phx.gbl...
>
> I have to say that I didn't understand this phrase:
>
>> you're pretty danged well off forcing the creation of the folder when you
>> first create the INI file, otherwise you might have some real
>> difficulties later when you come back to look for it.

It's a good habit to check if the folder exists and create it if necessary.
For example, GetTempPath() returns the temp folder, but the folder does not
necessarily exist. See the remarks section for Windows NT/2000/XP.

If you are using CSIDL vales, add CSIDL_FLAG_CREATE. To check if a folder
exists, you can use the following VB6 function:

http://vbnet.mvps.org/code/fileapi/folderexists.htm

If you want to check and create several folders, like
"SomeFolder\Company\Software", use InStrRev() to scan a string backward for
"\" and check and create folders as needed. You can also use
SHCreateDirectoryEx() which does this automatically, but it requires Shell
version 5.00.

> On other hand:
> I decided not to use the APPDATA folder in not NT systems (95/98/ME), and
> just to write to somewhere else on those O.S. versions as I used to do in
> the past.
>
> The other question is: do you think that now or in some future time it can
> be any trouble with it? I mean, do you think that some firewalls programs
> could do the same "nanny" work as Vista does on itself, but on 95/98/ME
> and disallow to write to "Programs files\appname" or "Windows\appname" or
> wherever?

Applications that secure a system, maybe. If you have a Windows 9x that has
shell version 5.00, maybe if you use the CSIDL, there might be an advantage
if the user later upgraded to XP or later, the setting could be moved to the
proper location, so the user doesn't have to reinstall your application. I
am not sure if the upgrade wizards even support this, I am just guessing at
what the advantages of using CSIDL in Windows 9x might be.


From: C Kevin Provance on
Did you install those Powertoys individually or from one package. I seem to
recall the powertoys package having a shell update for Win95.

"Karl E. Peterson" <karl(a)mvps.org> wrote in message
news:eeGiwxjYJHA.1272(a)TK2MSFTNGP04.phx.gbl...
| expvb wrote:
| > "Karl E. Peterson" <karl(a)mvps.org> wrote ...
| >> For curiosity sake, I just fired up a Win95 (950b; build 1111) VM
that's
| >> *almost* pure. The API returns these folders:
| >>
| >> CSIDL_APPDATA: C:\WINDOWS\Application Data
| >> CSIDL_LOCAL_APPDATA: C:\WINDOWS\Local Settings\Application Data
| >> CSIDL_COMMON_APPDATA: C:\WINDOWS\All Users\Application Data
| >
| > You must have installed something that updated the shell, or you are
using a
| > different function.
|
| My code uses SHGetFolderPathA if it's available (exported from
shfolder.dll),
| otherwise it calls SHGetPathFromIDList and SHGetSpecialFolderLocation.
I'm not sure
| what I may have installed. As I said, one VM I tried it with still had
IE3!
|
| Add/Remove programs shows:
| - Command Prompt Here Power Toy
| - Cygnus Hex Editor
| - Send To Extensions Power Toy
| - TextPad 4.6
| - Tweak UI
| - Virtual Machine Additions
| - WinZip
|
| On the ME system, the only thing I've installed are the Virtual Machine
Additions.
|
| Hmmm, looking on the 95 systems, the shfolder.dll files on both have an
internal
| version stamp of 5.00.2919.200 and the product name resource is
"Microsoft(R)
| Windows (R) 2000 Operating System". I have no idea where that originated!
Here's
| the list of supposed possibilities:
|
| http://support.microsoft.com/dllhelp/default.aspx?l=55&fid=96426
|
| And definitely none of those were installed on that VM. Now I'm really
puzzled.
| Definitely time to build a from-scratch VM.
| --
| .NET: It's About Trust!
| http://vfred.mvps.org
|
|


From: Karl E. Peterson on
Bill McCarthy wrote:
> "Karl E. Peterson" <karl(a)mvps.org> wrote ...
>> Well, no, I don't have a totally "clean" Win95 machine to verify that on.
>
> If you're using VPC you should look at using differencing discs. Makes it
> easy to rollback.

Differencing disks (coming to terms with) have been on my TODO list for too long
now!

> Admittedly these days hard disc space is so cheap I tend to just copy entire
> VPCs as soon as I create them.

Yep. That's what I'm doing now, too. Store a clean one, then store a couple more
with various common scenarios, and build from there as needed.
--
..NET: It's About Trust!
http://vfred.mvps.org