Is there a way to check if the my process can check whether its directory is on the Windows installation drive? For example, my file is on the D: drive but Windows is on the C: drive.
I want this because the file should be launched from an external drive.
With this can you also check whether the drive currently exists? Again an example, the file is on a USB in D:, can you check if the D drive still exists while the program is running? Like whether the USB in unplugged while running?
Split up the problem into the individual components:
access()to check whether the executable's path is still accessible.