RE: [ntfsd] Rf. : [ntfsd] RE: IRP_MJ_DIRECTORY_CONTROL

If that’s appropriate for your system, try to set FILE_REMOVABLE_MEDIA flag
in your disk’s device object Characteristics.

Regards,

Vladimir

-----Original Message-----
From: xxxxx@motus.com [mailto:xxxxx@motus.com]
Sent: Monday, January 28, 2002 12:25 PM
To: File Systems Developers
Subject: [ntfsd] R?f. : [ntfsd] RE: IRP_MJ_DIRECTORY_CONTROL

Hi,
Facing another little problem here, since my driver is never receiving
IRP_MJ_CREATE for Autorun.inf. (In fact, it receives it a couple of times,
but for unnamed files…)

What I guess is that my driver is created as a FILE_DEVICE_DISK (which is
exactly what I want it to be) and that IRP_MJ_CREATE with filenames are
passed when the driver is created as FILE_DEVICE_DISK_FILE_SYSTEM. May
that be my issue?

Is there another way to do that (receive those IRP)?


R?jean Caron - xxxxx@motus.com
Motus Technologies inc.

|--------±---------------------------------->
| | “Chtchetkine, Vladimir” |
| | | | rbase.com> |
| | Envoy? par : |
| | xxxxx@lists.o|
| | sr.com |
| | |
| | |
| | 2002-01-25 16:30 |
| | Veuillez r?pondre ? “File|
| | Systems Developers” |
| | |
|--------±---------------------------------->

>---------------------------------------------------------------------------
--------------------------------|
|
|
| Pour : “File Systems Developers”
|
| cc :
|
| Objet : [ntfsd] RE: IRP_MJ_DIRECTORY_CONTROL
|

>---------------------------------------------------------------------------
--------------------------------|

The approach you can take is this.
1. Have “autorun.inf” file located somewhere in your installation folder
(it even doesn’t have to be named “autorun.inf”).

2. Have your filter device (on the volume which icon you want to change)
looking for create IRP aiming \autorun.inf file.

3. Once such create is detected you may change FileObject.FileName with the
path to your autorun.inf in the installation folder and return
STATUS_REPARSE with IO_REPARSE in Information field of IoStatus structure.
Just remember to free “old” FileName.Buffer and path to your autorun.inf
file should be full system path: I believe \DosDevices\C:\Path (may be
wrong here).

The interesting part is that Explorer doesn’t use FindFirst to locate
autorun file. It blindly tries to open it. So you don’t have to hassle with
dircontrol IRP or anything else. Just create.

Hope this helps,

Vladimir

-----Original Message-----
From: xxxxx@motus.com [mailto:xxxxx@motus.com]
Sent: Friday, January 25, 2002 10:59 AM
To: File Systems Developers
Subject: [ntfsd] IRP_MJ_DIRECTORY_CONTROL

Hi,

I have seen a lot of questions regarding the way to “hide” file to the OS,
but I never saw anything like the way to simulate one. (Like to tell OS
that a file exists when it actually not.)

Basically, what we have to do is to change the icon of our virtual volumes,

in order to make them more visible (that’s the marketting dept.'s
reason!). After a couple of searches, I found that it is possible to
change drive icons, but for the whole system, which isn’t what I want…

I temporarly solve this situation (for demo purpose) by creating an
autorun.inf file that indicates a different icon, after volume creation.
But I don’t like this, since users may format the drive, or accidentally
erase the autorun.inf.

Does anybody have an idea on how to simulate this file? Or even have a
better approch? A simpler way to achieve this?

Thanks a lot,
-------------------------------------------------------
R?jean Caron - xxxxx@motus.com


You are currently subscribed to ntfsd as: xxxxx@Starbase.com

To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@motus.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@Starbase.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com