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: 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: Sure, it kinda works when using the image file path, but that's cheating since you already serve the .iso to PS.
It is currently June 5th, 2023, 7:41 pm
identify virtual drives
-
- Rainmeter Sage
- Posts: 5365
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: identify virutal drives
You do not have the required permissions to view the files attached to this post.
-
- Rainmeter Sage
- Posts: 15316
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: identify virutal drives
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. J in this case is the drive letter of the mounted drive.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:
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.
-
- Rainmeter Sage
- Posts: 5365
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: identify virutal drives
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?

-
- Rainmeter Sage
- Posts: 15316
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: identify virutal drives
Great!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.
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.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?![]()
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"
-
- Rainmeter Sage
- Posts: 5365
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: identify virutal drives
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.
-
- Rainmeter Sage
- Posts: 15316
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: identify virutal drives
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).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.
-
- Posts: 59
- Joined: March 23rd, 2023, 1:10 pm
Re: identify virtual drives
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.Yincognito » April 9th, 2023, 1:15 am
Regex is quite easy when it comes to basics
