-1

I'm using python prefetch view to read the prefetch files' content. But the tool show something like volume guid or anything instead of volume letter enter image description here

Is there any correct way to convert "\VOLUME{01d820ac778f54ef-ba78425f}" to drive letter? Do it correctly and logically instead of trying to randomly replace characters like "C:" or "D:"

2
  • My guess i you can find this correspndence somewhere in the Windows registry. Commented Oct 23, 2023 at 17:13
  • What is "python prefetch view"? Please post your relevant code. Commented Oct 23, 2023 at 17:14

1 Answer 1

0

Lol, I have found the solution to solve my problem

It is using this code to get details of the volumes (driver serial and driver letter)

import wmi

c = wmi.WMI()
Drivers_Information = []
def to_hex(val, nbits):
  return hex((val + (1 << nbits)) % (1 << nbits)).lstrip('0x')

for i in c.Win32_Volume():
    Drivers_Information.append(("Driver_serial\\"+str(to_hex(i.SerialNumber,32)).replace("0x","")+"\\",i.Caption))

And compare with the volume serial number in the "volume information" then I know exactly which driver letter represented by the \VOLUME{01d820ac778f54ef-ba78425f}

If you have another better solution, pls let me know.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.