none
calling EwfMgrCommit at every reboot RRS feed

  • General discussion

  • we have our software installed in windows xp embedded  which uses Enhanced Write Filter

    our software write some data for internal purpose....but does not get saved if data is not commited

    The drive is NTFS compressed ...hence cannot use EwfMgrCommitFile because of its limitations...

    we are planning to call EwfMgrCommit at every reboot to store it...

    Is it OK to call EwfMgrCommit  at every reboot ...will it have any side effects.....

    Thanks

    Thursday, May 3, 2012 1:56 PM

All replies

  • i may don't get the point... but why not just disabe the filter? or use another partition to store the data and protect the systemdrive?!

    Windows Embedded Developer and Scripting Guy //Germany (Preparing a blog about Windows Embedded Standard)

    Thursday, May 3, 2012 2:51 PM
  • The embedded systems are clients systems..and they have them already configured....They are all thin client machines with windows embedded OS.

    The machine only has once c drive and one small ramdrive....hence no other partitions....

    So our software is installed in c drive and we maintain some data which must be saved always....


    Also does disabling the filter make the system  store data always without doing a commit?
    Thursday, May 3, 2012 4:23 PM
  • disabling the filter means working like under normal windows conditions. files get written instantly on the drive.

    Windows Embedded Developer and Scripting Guy //Germany (Preparing a blog about Windows Embedded Standard)

    Thursday, May 3, 2012 5:54 PM
  • You mean to say that it will work like a normal drive and persist the data right..

    so can i use ewfmgr to disable the filter..will this work...

    http://msdn.microsoft.com/en-us/library/ms940853%28v=winembedded.5%29.asp

    The embedded OS has this console program already installed

    which switch should i use ...-Disable or -CommitAndDisable

    Does disabling the filter cause any kind of major issue to the embedded system..

    Also see that there is other filter FBWF..

    can fbwf api be usefull here?...but i dont see the files required to use the api in the embedded OS.





    Thursday, May 3, 2012 6:48 PM
  • you should read about the filters to achieve the best result:

    http://msdn.microsoft.com/en-us/library/aa940808(v=winembedded.5).aspx


    Windows Embedded Developer and Scripting Guy //Germany (Preparing a blog about Windows Embedded Standard)

    Thursday, May 3, 2012 7:14 PM
  • i have already gone through the documentation of filters..

    just want to understand more about it as these systems are already pre-configured..

    Let me know if anything is missed below

    These are following results

    1)use of EWFAPI and FWAPI depends on how the image is embedded os image is made
    2)our thin client is made up of ewfapi ..as only its driver and dlls are present in the system
    3)EWFAPI supports filebased commit but has restrictions
    --file must already exist in the image
    --file should not be NTFS compressed
    --must have fixed size and location

    EwfMgrCommitFile
    Misuse of this function can corrupt the protected volume. The file to be committed must already exist on the protected volume, and cannot have changed in size or location. If any of these requirements are not met, using this function will corrupt the underlying volume. This function does not verify that it is safe to commit the specified file.
    Additionally, this function should not be used on a file that is compressed by using compressed NTFS, because the file size and location are likely to change

    (our Thin client drive is NTFS compressed)

    4)EWFAPI can do full commit --which will commit all data in image --which may not be desired
    impact of commits-->Committing the overlay can impact the speed of the boot process
    http://msdn.microsoft.com/en-us/library/ms940853%28v=winembedded.5%29.aspx

    5)To use EWF and FWBF together in the same OS image, enable EWF on one volume and FBWF on another volume
    our Thin client does not have FWBF..only has EWF.
    Our Thin client has once c:\ and one ram drive
    OS is on c: drive and our software is also on C: drive

    So can i conclude the best solution for this will be disabling the filter in my situation?



    Thursday, May 3, 2012 7:25 PM
  • also let me know the answer for my previous comment of command to use switch.....

    which switch should i use ...-Disable or -CommitAndDisable?

    Thursday, May 3, 2012 8:02 PM
  • IMHO: it's beste to disable the Filter. - Commiting the EWF every time doesn't make sense to me. - It's a higher risk of cause problems/damage the system (if something goes wrong while -commitanddisable)

    -commitanddisable = it commtis all files instantly AND disables the write filter istantly. - after the command your Embedded device acts like a regular windows machine related to filehandling.

    -disable = disables the write filter on the next boot, files that are written while the session ewf gets disabled are lost. after the disable command the system also runs like a regular windows machine.

    the difference between thoose commands is only the one session/login while disableing.

    if you know you can maintain your devices, and data can be lost while this one 'disabling' session, you use -disable. if data are always important and also in your maintainence session - you use commitanddisable.

    i prefer -disable if i can.  -commitanddisable can currupt the filesystem if anything goes wrong while commiting.


    Windows Embedded Developer and Scripting Guy //Germany (Preparing a blog about Windows Embedded Standard)

    Friday, May 4, 2012 7:36 AM
  • If the thin client supported FBWF, you can just open a hole in the filter to support the data you want to preserve. Do you know if the devices supports FBWF?

    -Sean


    www.sjjmicro.com / www.seanliming.com / www.annabooks.com, Book Author - Pro Guide to WES 7, XP Embedded Advanced, Pro Guide to POS for .NET

    Friday, May 4, 2012 2:52 PM
    Moderator
  • The device does not support FBFW ..and that is problem...only EFW is there

    The machine has one system drive which is NTFS compressed....can we make it support FBFW ?How?

    Could you explain in what cases EwfMgrCommitFile can actually work ....

    my file is on NTFS compressed drive and its size is not going to remain fixed....

    Hence as per doc i cannot use this function... if i am not wrong?

    so with so many restriction how can this function be ever used ?

    Saturday, May 5, 2012 7:22 AM
  • The device does not support FBFW ..and that is problem...only EFW is there

    The machine has one system drive which is NTFS compressed....can we make it support FBFW ?How?

    ## would be pretty difficult but possible.

    Could you explain in what cases EwfMgrCommitFile can actually work ....

    ## it commits just one file in the overlay. but the size always has to be the same!

    my file is on NTFS compressed drive and its size is not going to remain fixed....

    ## than you can't usw the EWFFileCommit API

    Hence as per doc i cannot use this function... if i am not wrong?

    ## you're right

    so with so many restriction how can this function be ever used ?

    ## in many ways. - you also could use some dummy file which gets filled with useless data. but than the content can still grow. (e.g. 50mb file, 1mb initial content and than the real content can grow up to 50mb.)

    inline comments.

    Windows Embedded Developer and Scripting Guy //Germany (Preparing a blog about Windows Embedded Standard)

    Saturday, May 5, 2012 7:31 AM
  • Now i have problem if i call EwfMgrOpenProtected  from a non admin user.....it fails....

    Could tell me how to do EwfMgrOpenProtected from non admin user so i can call EwfMgrCommit from non admin user


    Tuesday, May 8, 2012 4:12 PM
  • The EWF controls were designed for admin use only. With that said, you could try Run As and use an Admin account.

    -Sean


    www.sjjmicro.com / www.seanliming.com / www.annabooks.com, Book Author - Pro Guide to WES 7, XP Embedded Advanced, Pro Guide to POS for .NET

    Tuesday, May 8, 2012 7:54 PM
    Moderator