locked
WM6.X Application Re-Installation Fails RRS feed

  • Question

  • When re-installing applications occassionally one fails. 
    Prior to WM6 we had code to remove all the files and registry entries from the device and then re-install and this always worked.

    With WM6 after clearing the device it still stops the install because there is now a record in the Software Management datastore.  This entry is made in the EDB file \mxip_swmgmt.vol within the SwMgmtMetadataStore.

    If I clear the entry using Memmaid then the re-install works.  I have tried to clear the entry in code but the check against GetLastError returned 6 which from the documentation  I believe is  ERROR_WRONG_PASSWORD.  The code executed is as follows:

      bool retValue = CeMountDBVolEx(ref ceGuid, "\\mxip_swmgmt.vol", IntPtr.Zero, OPEN_EXISTING);


    I am passing  IntPtr.Zero in the options argument as my understanding  of the documentation was that the options were ignored if you were opening an existing DB.

    If I change from mxip_swmgmt.vol to pim.vol then this works without any problem.

    Has anyone got a solution to clearing the entry to allow a re-install?  Thanks.

     

    Thursday, December 23, 2010 9:03 AM

All replies

  • Hello tgderekw,

     

    Welcome to MSDN Forum.

    My name is Brave Zhou and I will be working with you on this case.  I will do my best to resolve your problem as soon as possible.

     

    CeMountDBVolEx (EDB)

    Return Value


    TRUE indicates success. FALSE indicates failure. To get extended error information, call GetLastError. The following table shows possible values.

    ERROR_WRONG_PASSWORD

    The password pwszPassword member of CEVOLUMEOPTIONS is incorrect.

     

    So please check pwszPassword .

     

    For more information please refer to:

     

    http://msdn.microsoft.com/zh-cn/library/aa910660.aspx

     

     

    I look forward to hearing from you.

    Best Regards,

     


    Brave Zhou [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by bravezhou Wednesday, December 29, 2010 7:13 AM
    • Marked as answer by bravezhou Friday, December 31, 2010 2:56 AM
    • Unmarked as answer by tgderekw Tuesday, January 4, 2011 8:16 AM
    • Unproposed as answer by tgderekw Tuesday, January 4, 2011 8:34 AM
    Friday, December 24, 2010 9:34 AM
  • Hi tgderekw,

     

    I'm very interested in hearing more about your issue; did you solve your problem?

    If so please share the solution with us and mark the right answers. If not please let me know and I will try to help you find further solutions.

    Have a nice day!


    Brave Zhou [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, December 28, 2010 1:53 AM
  • Thanks for your response, sorry for the delay but I have been enjoying the holidays here.  The problem is not solved yet.  I was already using the MSDN link you added when in my original post I said, "I am passing  IntPtr.Zero in the options argument as my understanding  of the documentation was that the options were ignored if you were opening an existing DB."

    From the MSDN reference you have cited the paramater definition for pOptions is as follows:

    [in] Pointer to a CEVOLUMEOPTIONS (EDB) structure that contains settings for the behavior and performance of a newly mounted volume. If the volume is already mounted, these options are ignored. If NULL is passed in, the system defaults are used.

     

    By passing in IntPtr.Zero as the Null reference from C# code I understood that the system defaults would be used.  As you would expect, for security reasons, there is no documentation to say what password should be used for the Microsofts Software Management datastore...

    The main difference I can see between mxip_swmgmt.vol (which returns the error) and pim.vol (which is OK) is that this datastore is already in use with the Software Management service.  Therefore I believe that the volume is already mounted by the service and therefore the options would be ignored.

    Has anyone been able to open the mxip_swmgmt.vol using PInvoke from C#?

    Thanks for your efforts so far.

    Tuesday, January 4, 2011 8:31 AM
  • The documentation says that function CeMountDBVol is marked as obsolete and that CeMountDBVolEx should be used instead.  However CeMountDBVol works and allowed me to then continue to access the database.

    bool retValue = CeMountDBVol(ref ceGuid, "\\mxip_swmgmt.vol", OPEN_EXISTING);

    If anyone is aware of a way to use CeMountDBVolEx when accessing the mxip_swmgmt.vol then this would of course be better... 

    Monday, January 10, 2011 9:47 AM