How to find location of Media directory?

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!

mistert006Asked:
Who is Participating?
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
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
 
armoghanCommented:
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
 
armoghanCommented:
For Windows\media folder Idle_Mind's method is best one
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.