Search code examples
idefilepathapplication-settingsusb-flash-drive

Dynamic file path for IDE setting?


Can you set the drive letter to be dynamically added for an Windows application setting on a flash-USB?

Would it be an environment variable, and if so what would it be called? -> (i.e. %root%/Qt/4.8.1/bin)

Issue Example:

I have Qt SDK 1.2.1 installed on my flash drive for plug and play on any workstation without the environment. The issue is if the drive letter isn't assigned to be the same as when I installed it, things wont link or compile.


Solution

  • One approach (if your IDE supports this) could be to use an environment variable to refer to the drive name. Then when you know the letter, set the env. var to the appropriate value.

    Note: depending on your OS you might need to restart your IDE to pick up the change in the env. variable