sd_flppy Sample: How to Put a DACL on Floppy Drives

Click to open or copy the files for the sd_flppy sample.

This sample is a good starting place for anyone writing code to apply DACLs.

You can install a version of this sample program as a service, so that each time the machine boots up the DACLs are automatically reapplied.

There is no way to put a DACL on the floppy drives or on the COM ports with REGEDT32, or using the Control Panel or other part of the user interface. Also, there is no way to use the Win32® API to put a DACL on the floppy drives or on the COM ports that survives reboots.

However, the SD_FLPPY sample does put DACLs on the floppy drives or on the COM ports that survive logoff and logon; that is, these DACLs are on the floppy drives or on the COM ports until the next reboot.

This sample is not a supported utility.

Building SDK Samples

This sample uses the following keywords:

_stricmp; addaccessallowedace; callnamedpipe; closehandle; closeservicehandle; connectnamedpipe; crackargs; createevent; createfile; createnamedpipe; createservice; createthread; deleteservice; deregistereventsource; die; disconnectnamedpipe; displayhelp; enumservicesstatus; exit; getdrivetype; getlasterror; getsidlengthrequired; getsidsubauthority; getversion; initializeacl; initializesecuritydescriptor; initializesid; installservice; isvalidsecuritydescriptor; messagebox; openscmanager; openservice; perr; pmsg; printf; readfile; registereventsource; registerservicectrlhandler; removeservice; reportevent; reportstatustoscmgr; resumethread; service_ctrl; service_main; seterrormode; setevent; setfilesecurity; setsecuritydescriptordacl; setservicestatus; sprintf; startservicectrldispatcher; stopsimpleservice; strcat; strcpy; stricmp; suspendthread; switch; text; waitforsingleobject; worker_thread; writefile; writesd_toa_file