I am writing a piece of VBScript in which I want to Save a file (say, notepad) into my USB Stick. To do so, I am using AppActive and SendKeys "^s" which will pop up a window asking for the path.
The problem is I don't know what letter will my USB have on certain computers. On mine, it's E, but on my friend's PC it is G (anyway, irrelevant). Is there a way to say the path without including the letter?
I named my usb "USB" and simply tried to write the path without the letter. It works for my computer, but it doesn't work on any other PCs. Any suggestions?
PS: I'm working on Windows (if the OS is needed)
As for my research, I got this link, which is closest to my need, but not what I want. Getting USB Device path from USB port
UPDATE: Noodles' code was really good if you want to find the drive letter when you don't know it
UPDATE 2: I also found this http://www.howtogeek.com/96298/assign-a-static-drive-letter-to-a-usb-drive-in-windows-7/ So I can basically assign a random letter for my USB (say, Z) and simply use this as drive letter (hope it also works on windows 10)