Disk Utility(Same as autocheck)

Hi All,

I want to create a utility that will modify disk directly(Same as that of autocheck).
I want to modify some file-system data structures on disk. E.g. Renaming a file.

I am getting problems on Vista as it does not allow to write on disk if it is not
dismounted. But autocheck can do modifications on vista. I want to know what
tecnique it is using.

I have just read that autocheck uses implicit locking method, can some one
telll me how I can use it?

Thanks & Regards,
Amit.

Open the volume without specifying write share - this forces the filesystem
(and conforming FSFDs) to close and write handles.

wrote in message news:xxxxx@ntfsd…
> Hi All,
>
> I want to create a utility that will modify disk directly(Same as that of
> autocheck).
> I want to modify some file-system data structures on disk. E.g. Renaming a
> file.
>
> I am getting problems on Vista as it does not allow to write on disk if it
> is not
> dismounted. But autocheck can do modifications on vista. I want to know
> what
> tecnique it is using.
>
> I have just read that autocheck uses implicit locking method, can some one
> telll me how I can use it?
>
> Thanks & Regards,
> Amit.
>
>

> I am getting problems on Vista as it does not allow to write on disk if it is not

dismounted. But autocheck can do modifications on vista.

AutoChk writes sector-wise without using the FSD’s files and directories.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

On Thu, Apr 8, 2010 at 11:57 AM, wrote:
> But autocheck can do modifications on vista.

WHAT are you talking about? Autocheck is a Native program running via
BootExecute at a time when there are no writes to the disk. Autocheck
does not run after Win32 subsystem starts running (at least not
without some ugly, undocumented hacks…).

The disk checking program that runs in Win32 mode is chkdsk.exe. It is
distinct from autochk.exe and requires the file system to be
dismounted.


Aram Hăvărneanu

On Thu, Apr 8, 2010 at 9:32 PM, Maxim S. Shatskih
wrote:
>
> AutoChk writes sector-wise without using the FSD’s files and directories.
>

I believe OP wants to do the same thing. I think that post Vista
systems, restrict writes to the disk to areas where file system
reside. He has to dismount first. This is a good thing.


Aram Hăvărneanu

On Thu, Apr 8, 2010 at 10:16 PM, Aram Hăvărneanu wrote:
> On Thu, Apr 8, 2010 at 9:32 PM, Maxim S. Shatskih
> wrote:
>>
>> AutoChk writes sector-wise without using the FSD’s files and directories.
>>
>
> I believe OP wants to do the same thing. I think that post Vista
> systems, restrict writes to the disk to areas where file system
> reside. He has to dismount first. This is a good thing.
>

Obviously restrict should be read as prevent. Bah.


Aram Hăvărneanu

>I believe OP wants to do the same thing. I think that post Vista

systems, restrict writes to the disk to areas where file system
reside. He has to dismount first

Yes, lock, then write, then dismount and unlock, just like CHKDSK /F does.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

autochk belongs to a catagory of apps in windows called native apps.
by definition, a native app can only call native apis that is nt*
calls and nothing else. u create such an app and build using ddk and
mofidy a special registry key to ask windows to execute it at boot.

hope this helps.

amit.

On 4/8/10, xxxxx@yahoo.com wrote:
> Hi All,
>
> I want to create a utility that will modify disk directly(Same as that of
> autocheck).
> I want to modify some file-system data structures on disk. E.g. Renaming a
> file.
>
> I am getting problems on Vista as it does not allow to write on disk if it
> is not
> dismounted. But autocheck can do modifications on vista. I want to know what
> tecnique it is using.
>
> I have just read that autocheck uses implicit locking method, can some one
> telll me how I can use it?
>
> Thanks & Regards,
> Amit.
>
>
> —
> NTFSD is sponsored by OSR
>
> For our schedule of debugging and file system seminars
> (including our new fs mini-filter seminar) visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>



- amitr0

Hi All

First of all thanks for the reply.

I have written the native application same as that of autocheck. And now
it is working fine even on Vista and above OS.

I have opened the volume without specifying write share and it worked fine.
Thanks for rod widdowson.

I have gone through WDK samples for implicit lock. It’s a great concept
I have learned.

Thanks once again.
Amit.