Setting Special Folders

  • Thread starter Thread starter Quemasda
  • Start date Start date
Q

Quemasda

Hi,

The application I'm working on should set the Special Folders (Favorites,
My Documents, ...) but I can't find the way to do it. So far, I've been able
to get the path of those Special Folders but not set them. Does anybody know
how?

Thanks in advance, Que_Mas_Da.
 
Hi

By instance the personal folder (My documents)
Environment.GetFolderPath(Environment.SpecialFolder.Personal)

I hope this helps?

Cor
 
Hi Cor,

thanks a lot for your answer. In fact, this is what I use to get the
current path, but how do you set a new one if you want to change it?

Thanks again, Que_Mas_Da.
 
Hi Quemasda,

I think you can not change this kind of maps by hand, so why would you be
able to do it by program. It is just an enumeration from the used OP system
in my opinon.

Cor
 
You could do it up to VB6 by using and API function, so I suppose it might
be possible as well with VB.Net.

Que_Mas_Da
 
Que_Mas_Da,
..NET does not expose that API to be used, I would seriously question a
program that needed to use that API.

Anyway you can use the same API in VB.NET if you can use it in VB6. Just
remember that Integer is 16 bit in VB6 while its 32bit in VB.NET.

Hope this helps
Jay
 
Hi Jay,

Why are you so concerned about modifying those paths? Image a program
which sets the Favorite Folder. It could modify the current path of that
folder and set a new path in user convinience.

However, yesterday I found where all those paths are stored in the Windows
Registry. I'm trying to modify them in the registry. If I success, I'll post
the way here.

Thanks, Que_Mas_Da.
 
Quemasda,
Imagine a "virus" that changed one of the paths without letting the user
know. I suspect most users won't realize that when your program sets the
Favorite Folder path, it actually setting the Favorite Folder for all
programs.
However, yesterday I found where all those paths are stored in the Windows
Registry. I'm trying to modify them in the registry. If I success, I'll post
the way here.
IMHO this is even worse then using the API! As I understand they are in the
registry if they are not the default value...

If you have the API use the API. It sounded like you have the API. I hope
you realize that is what APIs are for...

Hope this helps
Jay
 
Hi Jay,

I hadn't realized your point of view. You are right, it is potentially
very dangerous. Thank you very much for your comments. I'll think of another
way to solve my problem without using this ;-)

Que_Mas_Da.
 
Hi Jay,

I think we both agree, however this is Quemasda his decision, you did not
give him a wrong advice.

Some learn from the experience from other developers, other from the
experience with users.

(You know that not all my messages are direct meant for the one I address
them to I hope)

:-)

Cor
 
Cor,
Is there a point here?

As I could interpret this a couple of different ways, and I'm sure hope both
are NOT what you meant.

Response not needed or expected.

Jay
 
Hi Jay,

This is to bad not to respond, my problem was that I did give a wrong advice
in this thread and you took it over and corrected it.

However I thought it seemed hard to convince Quemasda. (What was not needed
I saw now, because he sand his anser before mine).

Therefore I did want to add something to correct my mistake and to help you
because you took a lot of effort in it (even more than normally which is
already mostly a lot) to convince Quemasda, however it was not needed at all
to help you.

Cor
 
because you took a lot of effort in it (even more than normally which is
already mostly a lot) to convince Quemasda, however it was not needed at all
to help you.

You done good Cor :)
 
Back
Top