I have a usb stick with 2 partitions; one is mounted the other one isn't.
I wish to run a .bat
file on the mounted partition which starts another .bat
file on the 2nd partiion.
I was using a loop which gets me the drive path of the 2nd partition by searching for volumename. This works fine as long as the 2nd partion has a drive letter, but after removing it I can't find a way to access the data of the 2nd partition.
Is this even possible?
My code so far:
@ECHO off
for /f "skip=1 delims=:" %%A in ('"wmic logicaldisk where
VolumeName='Volume' get DeviceID"') do (
set "drive=%%A:"
goto :break
)
:break
cd /d %drive%
call other.bat
I was thinking about getting the GUID with this loop than access the volume by this ID but searching for code examples only brings me to the above code.
Edit: i am setting up a universal USB drive to manage my passwords, some function as a USB-Key to acess my pc and to manage other private settings. due to using the drive for a cuple of services that should be managed by different usb drives i was trying to create partitions in order get everything running. this will end up in ~4-5 partitions. thats why i was trying to hide all but one which would manage the others.