balazslaci on DeviantArthttps://www.deviantart.com/balazslaci/art/OpticalDriveStatus-1-661950112balazslaci

Deviation Actions

balazslaci's avatar

OpticalDriveStatus 1

By
Published:
653 Views

Description

I don't know if are you still using an optical drive, but me at least (instead of the fact that lately it's increasingly less used), still using one and will for a while. Since the first time I started to use Rainmeter, I always wanted to check the status of my DVD drive, wanting to know if its tray is open or closed and in this last case, if it either has or not a disk inserted. Over the years, I wrote a few skins trying to check this, with more or less succes. The task has been shown to be difficult, until finally I succeeded writing a such plugin: the OpticalDriveStatus, which I present right now.
So, this plugin does two things: checks the status of the drive tray. In plus, if the drive has a disk inserted, it extracts the icon of the disk, if it has one.

The content of the skin package:

• A skin, which can show the status of your drive (OpticalDriveTray.ini). The skin also can be used to open / close the drive (by clicking the icon of the drive). Also, if a disk is inserted, it'll show the label of it and if it has one, its icon. If the disk has no icon, the skin will show a generic icon, different for data disk and audio CD.
When you're hovering the mouse over the skin, in its right side two buttons will be shown: first will close the skin, while the second will open the Settings (see below).

• A Settings skin (this will be loaded first time when you install the skin), which can be used to set the letter of the drive you want to use the skin with. In this skin, only the optical drives will be accessible, as a dropdown list (yes, this menu will have so many elements as many optical drives are installed into the system - in most cases, one single). If the drive permit this, you also can set a time to automatically close the tray. This isn't available on most laptops, but usually it is on desktops.

• The plugin itself, in both (x86 and x64) versions.

• The nircmd.exe file, used to open / close the drive.

• During its use, the plugin will create an ico file into the temporary folder (%TEMP%). This icon is used by the skin.

I wrote the plugin in C++.

In the development of this plugin I got a lot of help from theAzack9. Many thanks to him.

© 2017 - 2024 balazslaci
Comments3
Join the community to add your comment. Already a deviant? Log In
sephirotess's avatar