Page 2 of 2

Re: External USB dvd script read, write and space

Posted: February 12th, 2017, 11:54 pm
by mak_kawa
At least in my opinion, it is impossible for Rainmeter (plugin) and even other application to get Read/Write Bytes for CD/DVD/BD drive.
If there is the way, I want to know how...

Re: External USB dvd script read, write and space

Posted: February 13th, 2017, 12:16 am
by mak_kawa
With regard to total/free space problem, possibly your fsutil returns a result in non-ascii string of your local language?

For me, the output of fsutil is;

空きバイト総数 : 11033284608
バイト総数 : 24218828800
利用可能な空きバイト総数 : 11033284608

that is, in Japanese...

Re: External USB dvd script read, write and space

Posted: February 13th, 2017, 3:20 pm
by balala
Big wrote:I try for my usb dvd to put '' IgnoreRemovable = 0 '' but noting change, the free space is 100% and graph no work. For my usb stick, all fonction work, graph and free space.
Add the IgnoreRemovable=0 option to all FreeDiskSpace measures (besides [Measure.Drive_Free], to the [Measure.Drive_Used] and the [Measure.Drive_Size] measures too).
mak_kawa wrote:Perfmon doesn't(can't) measure Disk Read/Write Bytes from your USB DVD drive, I think.
It seems that's right, the PerfMon plugin doesn't work with CDs/DVDs.
Big wrote:Ok but with Rainmeter....in plug-in, no .dll is possible to take the gestion of this.?
Maybe it would be, but for this the appropriate plugin should be written, either in C++, either in C#.

Returning to the question of reading the occupied space of a CD/DVD, I'm still saying it's possible with the slightly modified described method, but there're two questions which should be clarified previously:
  • What version of Windows are you using? I'm not sure, but have the impression that this method will work only on Windows 10 (or maybe in Windows 8 / 8.1 too, but not in any previous version).
  • What version of Rainmeter are you using? Check the existence of the RunCommand plugin: right click the Rainmeter icon in the notification area, then click About. Open the Plugins tab and check the list of plugins. Do you have listed there the RunCommand plugin?
If you're using Windows 10 (or maybe 8 / 8.1 - however I'm not sure about this) and you have the RunCommand plugin, you can move on. Otherwise, this method won't work, you'll have to find another way to do what you wanted.
What is the language of your operation system? If it's not English, you should try the followings:
first open a command prompt. Enter the following command and press enter: fsutil.exe volume diskfree c:. Here I used the c: drive Intentionally, it's not a mistake. I just want to know the language your operating system. Check what you see on the window: on an English operating system it should be something like:

Code: Select all

Total # of free bytes        : 68157751296
Total # of bytes             : 111270686720
Total # of avail free bytes  : 68157751296
(but obviously with different numeric values).
If you get here an error message, close the command prompt and open it as administrator and try again. Please copy and paste here what you got.
Finally not even matter too much what language your operating system works in, replacing the Substitute option of the [MeasureRun] measure with the following one should work: Substitute="\n":"","^.*(\d+).*: (\d+).*(\d+).*$":"\2". Please let me know if it does.