Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 16th December 2011, 18:58   #1
nsnb
Senior Member
 
Join Date: Jul 2008
Posts: 157
Question Has GetDrives Stopped Enumerating Mapped Drives in Windows7 ?

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?
nsnb is offline   Reply With Quote
Old 16th December 2011, 20:24   #2
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Could it be related to elevation? http://forums.winamp.com/showthread.php?t=339478
MSG is offline   Reply With Quote
Old 16th December 2011, 20:39   #3
pengyou
Major Dude
 
Join Date: Mar 2003
Posts: 571
GetDrives works on my Windows 7 Professional SP1 (64-bit) system, Here are the results from a test using "NET":
code:
X:\ (NET Drive)
Y:\ (NET Drive)


Tested using NSIS 2.45 using RequestExecutionLevel "user"
pengyou is offline   Reply With Quote
Old 16th December 2011, 21:09   #4
nsnb
Senior Member
 
Join Date: Jul 2008
Posts: 157
Lightbulb

Quote:
Originally Posted by pengyou View Post
GetDrives works on my Windows 7 Professional SP1 (64-bit) system, Tested using NSIS 2.45 using RequestExecutionLevel "user"
This is very interesting. I use:

Quote:
RequestExecutionLevel admin
Which 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.)
nsnb is offline   Reply With Quote
Old 16th December 2011, 23:49   #5
pengyou
Major Dude
 
Join Date: Mar 2003
Posts: 571
I forgot to mention that I ran my test from a standard account, not an administrator account.
pengyou is offline   Reply With Quote
Old 17th December 2011, 07:01   #6
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Quote:
Originally Posted by nsnb View Post
This is very interesting. I use:

requestexecutionlevel admin

Which should intuitively provide more access to the system, not less.
Anders did suggest that drive mapping (which are per-user) may not survive elevation. Intuitively, that seems pretty reasonable.
MSG is offline   Reply With Quote
Old 17th December 2011, 12:20   #7
pengyou
Major Dude
 
Join Date: Mar 2003
Posts: 571
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.
pengyou is offline   Reply With Quote
Old 19th December 2011, 11:40   #8
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,421
http://blogs.msdn.com/b/cjacks/archi...ows-vista.aspx

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 13th January 2012, 16:57   #9
nsnb
Senior Member
 
Join Date: Jul 2008
Posts: 157
Thumbs up

Quote:
Originally Posted by Anders View Post
Anders, you are the forum king. Thank you!
nsnb is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
getdrives, windows7

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump