It is currently March 28th, 2024, 11:31 pm

identify virtual drives

General topics related to Rainmeter.
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: identify virutal drives

Post by Yincognito »

Ok, saw that, but on my system (no physical CD or DVD drive available, but after mounting a virtual CD-ROM drive at V:) your command gives nothing I can use:
VDrive.jpg
Plus, how do I get the device path anyway? I tried using only the drive letter, same result - it even tells me that the drive is not a virtual one, lol:
VLetter.jpg
Sure, it kinda works when using the image file path, but that's cheating since you already serve the .iso to PS.
You do not have the required permissions to view the files attached to this post.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: identify virutal drives

Post by balala »

Yincognito wrote: April 9th, 2023, 11:35 am Ok, saw that, but on my system (no physical CD or DVD drive available, but after mounting a virtual CD-ROM drive at V:) your command gives nothing I can use:
I'm surprised, because it works for me. Believe or not, I still have a physical DVD drive (ugly, isn't it?). But at least in my opinion, this shouldn't matter. But I might be wrong at this point.
CD.png
J in this case is the drive letter of the mounted drive.
Maybe someone else should test this and let us know what is going on? Thanks to anyone willing to test...
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: identify virutal drives

Post by Yincognito »

balala wrote: April 9th, 2023, 3:29 pmJ in this case is the drive letter of the mounted drive.
Alright, I made it work eventually. I was using the Virtual Disk plugin for Total Commander to mount it (since it supports more formats), but tried using Windows Explorer and PS had a positive reaction, similar to yours. The question of the OP however was how to differentiate a virtual drive from a real one, as far as I could tell. So, did you see a difference in that regard when trying the command on your physical DVD drive (with some disk inside, obviously) compared to trying it on the virtual DVD drive you created as J? You know, something that can tell you for certain that the drive is virtual or not? :???:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: identify virutal drives

Post by balala »

Yincognito wrote: April 9th, 2023, 4:03 pm Alright, I made it work eventually. I was using the Virtual Disk plugin for Total Commander to mount it (since it supports more formats), but tried using Windows Explorer and PS had a positive reaction, similar to yours.
Great!
Yincognito wrote: April 9th, 2023, 4:03 pm The question of the OP however was how to differentiate a virtual drive from a real one, as far as I could tell. So, did you see a difference in that regard when trying the command on your physical DVD drive (with some disk inside, obviously) compared to trying it on the virtual DVD drive you created as J? You know, something that can tell you for certain that the drive is virtual or not? :???:
The posted WindowShell command doesn't return the drive letter of a real drive. It identifies only the mounted virtual drive. So if you get a drive letter with that command, that is definitely a virtual drive.
However in meantime I realized that the Substitute option of the [MeasureDriveType] measure should be extended, in order to get the case in which there is no mounted drive. For this the option should be replaced by something like: Substitute=".*\n-.*\n(.).*":"\1","\n":"",".*Error.*":"No drive"
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: identify virutal drives

Post by Yincognito »

balala wrote: April 9th, 2023, 5:41 pmThe posted WindowShell command doesn't return the drive letter of a real drive. It identifies only the mounted virtual drive. So if you get a drive letter with that command, that is definitely a virtual drive.
Ah, I see, you're right - this detail was under my nose the whole time, I probably missed it while trying to make it work. Still don't know why mounting with that plugin doesn't produce the expected PS result, but I'm glad it doesn't and actually "convinced" the system that the drive is real.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: identify virutal drives

Post by balala »

Yincognito wrote: April 9th, 2023, 6:00 pm Still don't know why mounting with that plugin doesn't produce the expected PS result, but I'm glad it doesn't and actually "convinced" the system that the drive is real.
Don't know either. What I know is that I'm mounting them by simply double-clicking the .iso file (I'm doing this in Total Commander, but this is not too important, I think).
Yue
Posts: 59
Joined: March 23rd, 2023, 1:10 pm

Re: identify virtual drives

Post by Yue »

Yincognito » April 9th, 2023, 1:15 am
Regex is quite easy when it comes to basics
The day I know about it surely will come. But right now it would be too much. I have a lot of code to rework now, getting used to the adviced methods. So I guess, besides possible queries on the advices I will be quiet for some time now. And after that I will follow the discussion of you two here because as I can see, I can prepare for this function being included in my skin. :D