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

Windows 7 and calling GetLogicalDriveStrings

21 views
Skip to first unread message

Pat

unread,
Sep 29, 2009, 5:21:01 PM9/29/09
to
When I call the Microsoft Function GetLogicalDriveStrings in VS2005 on
windows 7 platform it only returns the local c:\ drive. It does not return
any of my mapped network drives.

I figured out what it was after trying to get to those same mapped drive
letters in a
command prompt. If I entered the command prompt "As Administrator", then I
could
not change to any network drive by typing e.g. G: for example. I found out
that if I entered command prompt NOT "As Administrator" then I was able to
change to any
of my mapped network drives.

I see a similar problem when I call the Microsoft Function
GetLogicalDriveStrings in VS2005 IDE when launched "As Administrator" on the
Windows 7 platform. The call returns just the C: drive.
If I do not enter VS2005 "As Administrator" then GetLogicalDriveStrings
returns
all local and mapped network drives as expected.

Now VS2005 warns at startup to run "As Administrator" is recommended.

Any ideas why this function behaves differently based on whether I start
VS2005
"As Administrator" or not ?

Chris Becke

unread,
Oct 22, 2009, 4:16:19 AM10/22/09
to
Under UAC when an application is run "as administrator" (well, always
actually) then the environment for that applicastion is the chosen
administrators environment.

Because mapped drives are a per user setting, it might simply be that
the selected administrator account doesn't have the same drives mapped.

0 new messages