Lsdiorw Service

Summary: The Lsdiorw service is a service running under the local system account and allowing a low-level access to all drives under Windows 2000/XP/Vista/7/8, even from a plain user account. Current version (used with MacDisk 8.0) is 5.0.


Under Windows 2000/XP/Vista/7/8, our utilities don't use the Aspi layer any more. We wrote a specific service, named Lsdiorw, running under the local system account, which calls SPTI and IOCTL functions and allows plain users, even without administrator rights, to access the foreign physical drives not handled by Windows.


When running MacDisk installer (all versions), a special installer for the Lsdiorw service, named instserv.exe is launched (which installs and starts the service). This installer should run from an administrator account.
If the installation process fails and you can't find the files lsdiorw.exe and instserv.exe on your computer (normally in the folder C:\Program Files\LS_Duhem\lsdiorw under 32bit systems and C:\Program Files (x86)\LS_Duhem\lsdiorw under 64bit systems)), you can download a fresh version from our Web site. The archive contains four files (the service Lsdiorw.exe, the interactive installer lsdinst.exe and the silent installer instserv.exe and uninstaller unstserv.exe).


When desinstalling MacDisk, the service is desinstalled by the unstserv.exe utility. If you get a message about some items which could not be deleted, it means that the service could not be deleted directly. It will be deleted when you reboot your computer. You will then be able to delete manually the remaining folders (in the folder lsdiorw (see above).
You may also uninstall the service manually. Start lsdinst.exe. The Uninstall button does what you want.

GUI Installer/Uninstaller

Since the command line versions are fine in an automatic installation process but not very helpful when the user tries to do it under Windows, the Lsdiorw folder, from version 4, also contains an utility named ledinst.exe which offers a graphical interface and two buttons Intall and Uninstall (one being greyed out).
This utility also displays the version number of the service stored in the same folder, as an information, from version 4.5.

CreateProcess Failed-Code 740

It happens (in particular under Windows Vista and Windows 7/8), that the installation process doesn't go to its end and fails with above error message, with the added comment 'The requested operation requires elevation'. This means that the automatic installation of the service lsdiorw failed because the user rights are not sufficient. Go into the installation folder (normally 'Program Files (x86)') and launch lsdinst.exe. If asked whether you want to elevate your rights, answer 'Yes' and click on the Install button. This should be all. Relaunch MacDisk (whose installation always work) and up you are.

How to Know Which Version is Running?

In the Lsdiorw folder, leave the cursor on the executable (lsdiorw.exe). Windows should display its version.
You can also use the Service console (go to Start, Parameters, Control Panel, Administrative Tools, then Services). When you select the line with Lsdiorw, it displays its version from version 4. If it doesn't, this should be version 2.

Working Mode

When idle, the service runs in the background and does nothing. In particular, it doesn't consume resources.
It runs under all accounts (even for a plain user).
When a program wants to access the drives and use its functions, its passes the addresses of memory regions which will be shared amongst them to transfer commands and data.
When the application exits, it asks the service to free the handles opened on those memory regions and to return to the idle state.

Formatting Under Windows Vista/7/8

When you mount a Windows formatted drive (for instance an USB key) under recent versions of Windows, the drive is "protected", that is Windows protects some areas of the disk. If you want to reformat this drive as a Macintosh medium, this protection is not exactly what you want.
The solution is to format the drive once. MacDisk will write a Mac partition header in sector 0, but cannot write in the following sectors. You'll have to unmont (eject) the drive and insert it again. This time, Windows will tell you that the drive should be formatted to be used. Just dismiss the dialog box and launch the formatting process again. This time, MacDisk will be able to write to all sectors and will produce a Macintosh medium.

Error 2 - Physical or Virtual Disk?

If you get an error 2 (File not found) then a message about the lsdiorw service not being installed or free, odds are good that you installed the program (and its service) on a disk which is not a physical one, but what I call a virtual one (a disk on a network, or a disk mounted very late in the boot process, or created by an utility like subst.exe).
The lsdiorw service is launched by the system before Windows (or, better said, in the very first steps of Windows starting), when only physical disks are reachable.
In such a case, the system can't find the disk and can't find the file (message #1). After that, when MacDisk is launched, it can't find the service and thinks it is not installed or not free (there are only three slots to connect to the service).
First uninstall the service (lsdinst.exe, to be found in MacDisk installation folder, normally LS_Duhem in the 'Program Files' folder [or x86 folder]). Click on the button Uninstall. That's all for now.
Then copy the whole lsdiorw folder and put it on a physical drive. Redo the installation (launch lsdinst.exe, click on the Install button).

Other Errors

In case of errors (mainly caused by corrupted disks), the Service Manager (a component of Windows) can stop the service Lsdiorw. You then have to restart it. Go to Start, Parameters, Control Panel, Administrative Tools and Services. In this so-called console, right click on the Lsdiorw entry and select the Start item. This operation should be done from an administrator account.
You may also (is it less complicated?) reboot the computer.
Please note that, in this case, you don't have to reinstall the service from scratch. Services can be correctly installed but not yet started.

Disk Access Rights

Administrators may legitimately fear that users could do some low-level operations (like formatting) on some disks that should be protected against that. To implement the security model, administrators may define, in MacDisk, a black list of disks.
This black list contains all local disks on the computer that should not show in the Drive Selection window.
Since the black list is a standard feature of MacDisk, we implemented a method to lock it (the normal user can't access it any more). See the file "admin.txt" in the installation folder.
On the other hand, MacDisk version 7 and higher doesn't display hard disks formatted as FAT, FAT32 or NTFS by default, to protect users against themselves.

Setting of Windows Firewall (XP SP 2 and higher)

If your computer runs under Windows XP SP2 and higher and if you are using Windows Firewall, you may have to correct its settings to allow MacDisk to call its low-level disk access service Lsdiorw.exe.
To this end, open the Firewall in the Control Panel (to be found in the Start menu or in the Start menu, then the Settings folder). On the Exceptions tab, click Add Program. If the service Lsdiorw appears in this list, double click on its name. If it not the case, click the Browse button. The service Lsdiorw is to be found in the folder C:\Program Files [x86]\LS_Duhem\Lsdiorw. It will appear with its .exe extension or not, depending on the settings you use to display files and programs in the Explorer.

Antivirus programs and "sandbox" mode

Some antivirus programs create a so-called "sandbox" mode to check the behavior of unknown applications. The user may normally answer that the software is known and trustable. In the case of MacDisk, you'll have to do it once for MacDisk and once for Lsdiorw.
Caution: if your antivirus software also features a silent mode, you may never get those messages and in such a case, so-called unknown applications will never be able to run.
This happened to me. I just had to inhibate the silent mode to get the messages and to validate the programs.

Pierre Duhem (ex-Logiciels & Services Duhem)
3, rue Pierre Haret - F-75009 Paris (France) - Tel. (+33) [0]149 700 455