Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Application.StartupPath on Windows 7

101 views
Skip to first unread message
Message has been deleted

Family Tree Mike

unread,
Jan 5, 2010, 9:36:09 PM1/5/10
to
On 1/5/2010 8:56 PM, Joe Cool wrote:
> Using Visual Studio 2008, C#.NET. How come referencing
> Application.StartupPath on Windows 7 translates to:
>
> c:\users\superuser\Documents\Visual Studio 2008\Projects\mySolution
> \mySolution\bin\Debug
>
> which does not exist, instead of:
>
> c:\users\superuser\My Documents\Visual Studio 2008\Projects\mySolution
> \mySolution\bin\Debug
>
> which DOES exist?

You never developed on Vista? The same thing happens there. It is
Folder Virtualization. It should not cause any issues for you unless
you hard code something.

--
Mike

Peter Duniho

unread,
Jan 5, 2010, 10:40:15 PM1/5/10
to

Actually, while in this context the distinction is probably not
important, that's not actually folder virtualization. It's a feature
that's been around since XP in one form or another, in which the
Explorer-displayed names are not exactly the same as those found on the
file system. In particular, in the file system, the word "My" is not
found, but in Explorer is automatically pre-pended to certain special
folders.

Folder virtualization is new to Vista, and is part of the system that
allows software running under limited accounts to access file system
areas that would normally be restricted to them. The OS virtualizes the
folder, effectively giving the user a private copy of the folder, so
that the software can make changes without affecting any other user
accounts on the computer.

As far as the OP's question goes, the bottom line is that the _first_
path is the only one that does exist, while the latter path in reality
does not.

Pete

Craig Berntson

unread,
Jan 6, 2010, 11:58:44 AM1/6/10
to
Thanks...now I know who to blame for the stupid My stuff.

--

Craig Berntson
Microsoft MVP

-------------
"Peter Duniho" <no.pet...@no.nwlink.spam.com> wrote in message
news:OCC32Hoj...@TK2MSFTNGP04.phx.gbl...

0 new messages