Solved

How to find location of Media directory?

Posted on 2004-10-14
5
171 Views
Last Modified: 2010-04-23
Sometimes the Media directory is in \Windows\Media, sometimes it is in \WINNT\Media, and possibly other places.  Is there any way to know where it is without searching?

Thanks for any ideas!

0
Comment
Question by:mistert006
  • 2
5 Comments
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 250 total points
ID: 12313413
There is probably a better way than this (I hope):

    Dim mediaFolder As String
    mediaFolder = Environment.GetEnvironmentVariable("windir") & "\Media"
    MsgBox("Exists: " & System.IO.File.Exists(mediaFolder), MsgBoxStyle.Information, mediaFolder)

~IM
0
 
LVL 18

Assisted Solution

by:armoghan
armoghan earned 250 total points
ID: 12318292
If you need Music folder do soemthing like this
Dim mediaFolder As String
mediaFolder =Environment.GetFolderPath(Environment.SpecialFolder.MyMusic)

see the other options in SpecialFolder as well
0
 
LVL 18

Expert Comment

by:armoghan
ID: 12318320
For Windows\media folder Idle_Mind's method is best one
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now