Link to home
Start Free TrialLog in
Avatar of Here2Help
Here2HelpFlag 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.

Hey.

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?

Cheers.

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


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

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Here2Help

ASKER

Hey.

Just what I was looking for!

Thanks.