OK. it’s a little bit more clear now. So, in your driver you create only
disk device (FILE_DEVICE_DISK) and let the user to format that device with
whatever FS is chosen. So, when an FS is mount it will be one of the
“standard” FS.
In this case you should create a filter device and attach it to each FS
device that has been mount on your volumes. Then, you can filter
IRP_MJ_CREATE and “insert” autorun.inf as it was discussed earlier.
Regards,
Vladimir
-----Original Message-----
From: xxxxx@motus.com [mailto:xxxxx@motus.com]
Sent: Tuesday, January 29, 2002 7:22 AM
To: File Systems Developers
Subject: [ntfsd] R?f. : [ntfsd] RE: IRP_MJ_DIRECTORY_CONTROL
No… I must say that you were right. Explorer effectively tries to
open Autorun.inf AND desktop.ini…
The only thing left is that this only works for
FILE_DEVICE_DISK_FILE_SYSTEM. Or maybe I missed something?
To be more precise, what we are doing is a virtual disk, which physically
resides in one or more files on a physical drive. (i.e. c:
\xxx\yyy\file.mot)
The reason why I use FILE_DEVICE_DISK, is that it’s left to the OS’s
responsability to know about the structure of the virtual volume (i.e :
FAT, NTFS, FAT32, and whatever else).
Read and Write request are then translated into what the OS wants to read
or write. Based on the OS requests, we are now able to translate it in
proprietary coordinates, calculate checksums, switch from one file to
another, etc, and totally transparently to the OS.
Thanks for your help.
R?jean Caron - xxxxx@motus.com
Motus Technologies inc.
|--------±---------------------------------->
| | “Chtchetkine, Vladimir” |
| | | | rbase.com> |
| | Envoy? par : |
| | xxxxx@lists.o|
| | sr.com |
| | |
| | |
| | 2002-01-29 09:54 |
| | Veuillez r?pondre ? “File|
| | Systems Developers” |
| | |
|--------±---------------------------------->
>---------------------------------------------------------------------------
--------------------------------|
|
|
| Pour : “File Systems Developers”
|
| cc :
|
| Objet : [ntfsd] RE: IRP_MJ_DIRECTORY_CONTROL
|
>---------------------------------------------------------------------------
--------------------------------|
I must apologize. When I was saying “Explorer opens autorun.inf” I was
meant to say “Explorer opens desktop.ini file”.
I’m sorry. So, I guess, this just gives you an extra work with (as you’ve
thought) adding “autorun.inf” entry into
root folder’s directory content. Everything else is unchanged.
Regards,
Vladimir
-----Original Message-----
From: xxxxx@motus.com [mailto:xxxxx@motus.com]
Sent: Tuesday, January 29, 2002 5:20 AM
To: File Systems Developers
Subject: [ntfsd] R?f. : [ntfsd] RE: [ntfsd] R?f. : [ntfsd] RE:
IRP_MJ_DIRECTORY_CONTROL
Thanks a lot,
But, that didn’t solve the problem. I still can’t receive IRP_MJ_CREATE.
I guess the simplest thing to do is to create a filter device everytime as
virtual disk is created (and delete it when appropriated). It will be a
lot easier to maintain open file count, etc.
Any better solution?
-------------------------------------------------------
R?jean Caron - xxxxx@motus.com
Motus Technologies inc.
|--------±---------------------------------->
| | “Chtchetkine, Vladimir” |
| | | | rbase.com> |
| | Envoy? par : |
| | xxxxx@lists.o|
| | sr.com |
| | |
| | |
| | 2002-01-28 16:12 |
| | Veuillez r?pondre ? “File|
| | Systems Developers” |
| | |
|--------±---------------------------------->
>
----------------------------------------------------------------------------
-------------------------------|
|
|
| Pour : “File Systems Developers”
|
| cc :
|
| Objet : [ntfsd] RE: [ntfsd] R?f. : [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: 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: 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