Solved

How to find location of Media directory?

Posted on 2004-10-14
5
169 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
Comment Utility
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
Comment Utility
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
Comment Utility
For Windows\media folder Idle_Mind's method is best one
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

744 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

12 Experts available now in Live!

Get 1:1 Help Now