I have been using the very useful GetDrives function for a while, but only today I discovered that while it continues to work perfectly on Windows XP, it doesn't list network-mapped drives on Windows 7.
(I tried both the default "ALL" and the more specific "FDD+HDD+CDROM+NET+RAM" option)
Is this known behavior?
Any suggestion how to enumerate all drives (including mapped network shares) on Windows 7?
Has GetDrives Stopped Enumerating Mapped Drives in Windows7 ?
9 posts
Could it be related to elevation? http://forums.winamp.com/showthread.php?t=339478
GetDrives works on my Windows 7 Professional SP1 (64-bit) system, Here are the results from a test using "NET":
Tested using NSIS 2.45 using RequestExecutionLevel "user"X:\ (NET Drive)
Y:\ (NET Drive)
This is very interesting. I use:Originally Posted by pengyou View PostGetDrives works on my Windows 7 Professional SP1 (64-bit) system, Tested using NSIS 2.45 using RequestExecutionLevel "user"
RequestExecutionLevel adminWhich should intuitively provide more access to the system, not less.
I will test this with user and see what happens.
(BTW, I am using NSIS 2.45, too. I should upgrade to the latest 2.46, I know.)
I forgot to mention that I ran my test from a standard account, not an administrator account.
Anders did suggest that drive mapping (which are per-user) may not survive elevation. Intuitively, that seems pretty reasonable.Originally Posted by nsnb View PostThis is very interesting. I use:
requestexecutionlevel admin
Which should intuitively provide more access to the system, not less.
Anders is right - if you elevate then GetDrives can only see the drives mapped by the administrative rights account.
My admin account does not have any mapped drives so when I re-ran my test with RequestExecutionLevel "admin" the GetDrives NET option did not find anything.
My admin account does not have any mapped drives so when I re-ran my test with RequestExecutionLevel "admin" the GetDrives NET option did not find anything.
Anders, you are the forum king. Thank you!Originally Posted by Anders View Post