Avatar of Here2Help
Flag for United Kingdom of Great Britain and Northern Ireland asked on

Visual Basic 2010 Express: Determine USB Drive letter or find out from which drive the program is launched from.


I'm creating an application in Visual Basic 2010 Express. The app will launch other portable apps from a USB pen drive. The problem is I need to identify what the USB drive letter will be so I can get the correct path to the program file I want to launch. What variable can I use?

Or maybe there's another way to do this?


Example code (where E: should be a variable for the USB drive letter):

Shell ("E:\Programdir\Prog.exe")

Open in new window

Microsoft DevelopmentEditors IDEs

Avatar of undefined
Last Comment

8/22/2022 - Mon
Mike Tomlinson

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question


Just what I was looking for!

I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck