Problem with SUBST on Vista

G

Guest

Our build process is set up so we have most of our include files and libs on
an M drive. Each developer mounts the folder they use that holds these
include and libs files as the M drive using the SUBST command. This has
worked for us for years. However, we are running into a problem on Vista.

You can mount a folder as a drive using the SUBST command on Vista. It
shows up in explorer and you can even see it in Word 2007. However, using VS
2005 SP1 or VS2003, it doesn't show up under "Computer" when you display the
file open
dialog. Furthermore, it doesn't find any of these include files that are on
the M drive.

This looks like a bug to me in Vista or possibly VS. What should I do?
 
K

Kerry Brown

Try sharing the folder then map M: to it. If this works it can be scripted
with NET USE instead of SUBST.
 
G

Guest

That works but it's a bit ugly. Why doesn't the drive created using SUBST
show up in VS if it shows up in explorer?
 
K

Kerry Brown

I don't know why. Actually I think mapping a drive is a bit more elegant
than SUBST. It gives you more options for moving the location of the files
in the future.
 
S

Steve Cochran

You could try using the SHBrowseForFolder API call instead of the Browse for
folder control in VS and see if that shows the subst drives.

steve
 
T

T

I have noticed that SUBST is user account specific. With UAC active, a
non-admin SUBST will not be visible in an admin shell/process. It sounds
like your VS is running with elevated priviledges (or visa versa). Try
running your script under both scenarios (Run as Administrator and not) and
see if that's your problem. I don't have your problem but I do know that UAC
can be a major pain in mixed-mode operations.

Tim
 
G

Guest

That's it! Thanks T.

I ran the batch file we use to map the drive as admin and it shows up in
VS2005.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top