Ask a questionAsk a question
 

AnswerMsiRMFilesInUse dialog using VS2005 Installation Project & Orca

  • Monday, November 06, 2006 10:10 PMDerek C Sanderson Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I have a pretty simple installation project created using VS 2005 installation project, and am having several issues complying with some of the requirements. So far, my most frustrating problem is test case 25(v1.1.001 of Certified for Windows Vista Test Cases).

    There is no MriRMFilesInUse dialog available through visual studio, so my understanding is that I have to create my own manually using Orca. After digging and digging, I was able to find a very old, prerelease rss feed of what the tables needed to have in them for the dialog: http://blogs.msdn.com/windows_installer_team/archive/2005/11/03/488945.aspx

    Based on this, I added all those fields and values (with a couple minor variations such as the binary banner filename (i just used the default), and the text property of the title of the dialog was changed to better suit my needs. Also I had to change one of the text fields of the radio buttons because orca reported it as being too long. Besides those three items, it looks exactly the same.

    Orca does not complain at all about it, and it following the verification steps in the test cases, it should pass that test. However, when I have those fields added, it no longer installs, which is a much bigger problem than what I started with. After those changes, when trying to install, I get Error number 2356, which per a lookup has something to do with a cabinet file being missing or corrupt, which I dont think is actually the problem.

    The test case documents makes mention of a transformation that can be used to add that dialog to an existing application, but I havent found anything like that anywhere. I have requested support on it from the technical contact I was provided with, as well as on the Innovate request support page (middle of last week) and have not had a response.

      Derek

Answers

  • Thursday, November 16, 2006 8:47 PMDerek C Sanderson Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    The problem was actually the embeded cabinets in the msi were not saving when I did File Save from Orca. Visual Studio Installation Project packages the cabs in the msi by default. When I saved in Orca, the install UI and everything worked, but then there was nothing in the msi, so I got error 2356 when I tried to install, because the files were missing. This was real easy to see once I reallized the file size of my msi went from 24mb to 400k.

    So, what I did was create a transform. I opened the msi, then clicked Transform/New Transform. I then ran through all of the steps of adding the MsiRMFilesInUse dialog:

    Control table:

    Dialog Control Type X Y Width Height Attributes Property Text Control_Next Help
    MsiRMFilesInUse Cancel PushButton 301 243 66 17 3   Cancel Restart  
    MsiRMFilesInUse Restart RadioButtonGroup 19 187 343 40 3 RestartManagerOption   List  
    MsiRMFilesInUse Banner Bitmap 0 0 374 44 1   DefBannerBitmap    
    MsiRMFilesInUse OK PushButton 230 243 66 17 3   OK Cancel  
    MsiRMFilesInUse DlgText Text 21 51 348 14 3   The following applications are using files that need to be updated by this setup.    
    MsiRMFilesInUse DlgTitle Text 13 6 292 25 65539   {\VSI_MS_Sans_Serif16.0_1_0}Files in Use    
    MsiRMFilesInUse DlgDesc Text 21 23 292 25 65539   Some files that need to be updated are currently in use.    
    MsiRMFilesInUse BannerLine Line 0 44 374 0 1   DefBannerBitmap    
    MsiRMFilesInUse List ListBox 21 66 331 135 3 FileInUseProcess   OK  
    MsiRMFilesInUse DlgLine Line 48 234 326 0 1   DefBannerBitmap    

     

    ControlEvent table:

    Dialog Control_ Event Argument Condition Ordering
    MsiRMFilesInUse Cancel EndDialog Exit 1 1
    MsiRMFilesInUse OK EndDialog Return 1 1
    MsiRMFilesInUse OK RMShutdownAndRestart 0 RestartManagerOption="CloseRestart" 2

     

    Dialog table:

    Dialog Hcentering Vcentering Width Height Attributes Title Contol_First Control_Default Control_Cancel
    MsiRMFilesInUse 50 50 374 266 19 [ProductName] -Files in Use OK OK Cancel

     

    Property table:

    Property Value
    RestartManagerOption CloseRestart

     

    RadioButton table:

    Property Order Value X Y Width Height Text Help
    RestartManagerOption 1 CloseRestart 6 9 331 14 Automatically close and attempt to restart applications.  
    RestartManagerOption 2 Reboot 6 21 322 17 Do not close applications. (A reboot will be required.)  

     

    Once I had everything entered, select Generate Transform from the Transform menu, and save the file.

    Now I can apply that transform from the command line using MsiTran.exe (in Windows SDK). I added this to my PostBuildEvent:

    "C:\Program Files\Microsoft SDKs\Windows\v1.0\Bin\msitran" -a "$(ProjectDir)AddMsiRMFilesInUse.mst" "$(BuiltOuputPath)"

    Now every time it builds the installation, it applies this transform, and my msi is magically compliant (well, at least to Test Case 25).

  • Monday, March 05, 2007 9:10 PMBruce N. Baker - MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Some more info:

     

    On the save problem you can set the options to include a cabinet.

     

    From the forum thread, Orca provides an option to do a “Save As” that includes the cabinet when saving.  The Orca documentation which is available from the Help menu details how to do this. By default, it doesn’t include cabs.  However, if you go to the options page, you’ll be able to indicate this.

     

    Other authoring tools have full support for the MsiRMFilesInUse dialog.  Visual Studio’s MSI creation tool is quite limited across the board with respect to functionality for creating MSI packages.  There are free tools that are more fully functional (such as WiX) that can be used to build packages.  Note that Wix also includes a Visual Studio plug-in.

     

All Replies

  • Tuesday, November 07, 2006 4:26 PMOliver Lundt - MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Dereck, I'm looking into this today and I'll let you know what I find.

    Based on your post only Studio 2005 and orca are the only tools used. No compression of the msi file is done?



  • Tuesday, November 07, 2006 5:09 PMDerek C Sanderson Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Yes, I am just creating the package using VS 2005, then using Orca to add the extras that are required for Vista Certification. I would much rather not have to use Orca if possible. It sure does seem like I should be able to create a Vista compliant installation without leaving VS 2005. If nothing else some command line tools that I could incorporate into my post build steps and automated team build scripts.
  • Thursday, November 09, 2006 10:11 PMOliver Lundt - MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    When looking at Compression as an issue. It was discovered that Orca wasn't saving the msi correctly. Once it was saving correctly then every worked with no error.
  • Thursday, November 16, 2006 8:47 PMDerek C Sanderson Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    The problem was actually the embeded cabinets in the msi were not saving when I did File Save from Orca. Visual Studio Installation Project packages the cabs in the msi by default. When I saved in Orca, the install UI and everything worked, but then there was nothing in the msi, so I got error 2356 when I tried to install, because the files were missing. This was real easy to see once I reallized the file size of my msi went from 24mb to 400k.

    So, what I did was create a transform. I opened the msi, then clicked Transform/New Transform. I then ran through all of the steps of adding the MsiRMFilesInUse dialog:

    Control table:

    Dialog Control Type X Y Width Height Attributes Property Text Control_Next Help
    MsiRMFilesInUse Cancel PushButton 301 243 66 17 3   Cancel Restart  
    MsiRMFilesInUse Restart RadioButtonGroup 19 187 343 40 3 RestartManagerOption   List  
    MsiRMFilesInUse Banner Bitmap 0 0 374 44 1   DefBannerBitmap    
    MsiRMFilesInUse OK PushButton 230 243 66 17 3   OK Cancel  
    MsiRMFilesInUse DlgText Text 21 51 348 14 3   The following applications are using files that need to be updated by this setup.    
    MsiRMFilesInUse DlgTitle Text 13 6 292 25 65539   {\VSI_MS_Sans_Serif16.0_1_0}Files in Use    
    MsiRMFilesInUse DlgDesc Text 21 23 292 25 65539   Some files that need to be updated are currently in use.    
    MsiRMFilesInUse BannerLine Line 0 44 374 0 1   DefBannerBitmap    
    MsiRMFilesInUse List ListBox 21 66 331 135 3 FileInUseProcess   OK  
    MsiRMFilesInUse DlgLine Line 48 234 326 0 1   DefBannerBitmap    

     

    ControlEvent table:

    Dialog Control_ Event Argument Condition Ordering
    MsiRMFilesInUse Cancel EndDialog Exit 1 1
    MsiRMFilesInUse OK EndDialog Return 1 1
    MsiRMFilesInUse OK RMShutdownAndRestart 0 RestartManagerOption="CloseRestart" 2

     

    Dialog table:

    Dialog Hcentering Vcentering Width Height Attributes Title Contol_First Control_Default Control_Cancel
    MsiRMFilesInUse 50 50 374 266 19 [ProductName] -Files in Use OK OK Cancel

     

    Property table:

    Property Value
    RestartManagerOption CloseRestart

     

    RadioButton table:

    Property Order Value X Y Width Height Text Help
    RestartManagerOption 1 CloseRestart 6 9 331 14 Automatically close and attempt to restart applications.  
    RestartManagerOption 2 Reboot 6 21 322 17 Do not close applications. (A reboot will be required.)  

     

    Once I had everything entered, select Generate Transform from the Transform menu, and save the file.

    Now I can apply that transform from the command line using MsiTran.exe (in Windows SDK). I added this to my PostBuildEvent:

    "C:\Program Files\Microsoft SDKs\Windows\v1.0\Bin\msitran" -a "$(ProjectDir)AddMsiRMFilesInUse.mst" "$(BuiltOuputPath)"

    Now every time it builds the installation, it applies this transform, and my msi is magically compliant (well, at least to Test Case 25).

  • Wednesday, February 21, 2007 5:32 PMJefffRozar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I tried this and it does put the MsiRMFilesInUse dialog in the MSI file, but the result is that on uninstall, it tells the user: "The setup must update files or services that cannot be updated while the system is running. If you choose to continue, a reboot will be required to complete the setup."

    If I do not apply the transform to my MSI file, this message is never shown.

  • Thursday, February 22, 2007 9:05 AMSimon Williams 123456789 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    That's really useful.  Thanks for letting us know how to add the MsiRMFilesInUse dialog.

    I too had a similar problem with transforms in Orca.  Are you saying that if you use the MsiTran.exe tool in a post build event, it solves the problem where the cab files were not being included, but if you run the transform from Orca you get the problem?

    Many thanks for the information.

  • Thursday, February 22, 2007 8:11 PMDerek C Sanderson Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Well, not exactly. It is probably more my limitted familiarity with using Orca. The transform will apply fine from within Orca, but if you just hit file/save, only the installation project is saved back to the msi, and all the good stuff (like the application itself) is not saved. I'm sure there is a way to do it correctly, but I needed to be able to apply the transform from the command line anyway, and once I got that working I didnt bother with Orca's Save anymore, only the Genereate Transform.
  • Friday, March 02, 2007 4:40 AMMartin Mamo Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Can you email your MsiRMFilesInUse transform file to me. My email address is

    martin_mamo@nospam.hotmail.com

    (take out the nospam from my email address)

     

    Regards

    Martin

  • Monday, March 05, 2007 9:10 PMBruce N. Baker - MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Some more info:

     

    On the save problem you can set the options to include a cabinet.

     

    From the forum thread, Orca provides an option to do a “Save As” that includes the cabinet when saving.  The Orca documentation which is available from the Help menu details how to do this. By default, it doesn’t include cabs.  However, if you go to the options page, you’ll be able to indicate this.

     

    Other authoring tools have full support for the MsiRMFilesInUse dialog.  Visual Studio’s MSI creation tool is quite limited across the board with respect to functionality for creating MSI packages.  There are free tools that are more fully functional (such as WiX) that can be used to build packages.  Note that Wix also includes a Visual Studio plug-in.

     

  • Wednesday, May 23, 2007 1:52 PMSven Buth Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hello guys,

     

    please correct me if I am wrong:

     

    Test Case 25 tells us to use this MsiRMFilesInUse dialog. But actually no tool delivered by Microsoft is able to generate such an installer package. And Microsoft is not at least able to provide the orca transform package for adding this dialog to an existing package. So every developer on earth who would like get the Certified for Windows Vista Logo has to hack these 18 lines of code into orca. That reminds of the good old times as we had to enter thousands of lines of binary code from a computer magazine to get some nice programs for the C64 ;-)

    Thank you Microsoft.

     

    Bye Sven

  • Thursday, December 13, 2007 10:21 AMIvan Gracia Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi guys,

    I'd like to know if there is any way I can use this dialog (with modifications) to ask if some files are to be kept or erased on uninstall. I know I can do this with a custom action, but modifying with ORCA would be nice. How could I show a custom dialog? How do I know if there are files left in the installation folder?

    Thanks a lot!
    Ivan
  • Wednesday, April 30, 2008 3:11 AMTracyJiang Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi JeffRozar,

    When i upgrate my ISM project to InstallSheild 2008, there exsits MsiRMFilesInUse dialog in MSI file, all the information in ControlEvent table,Control table, Property table,Dialog table,RadioButton table are correct. However after i install msi file on vista, and then repair it in control panel,   also pop up a dialog ,and tell the user "The setup must update files or services that cannot be updated while the system is running. If you choose to continue, a reboot will be required to complete the setup"

    I would like to know how can you fix this issue.

     

    Thanks

    Tracy

  • Thursday, May 08, 2008 4:52 PMShofar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I would also like to know how to fix this problem.  I have two services that need to be stopped before uninstalling/upgrade/repair in system context so they are marked that way in the ServiceControl table.  Unfortunately Windows Installer’s InstallValidate action doesn’t seem to take that into account correctly when detecting the files in use on Vista with UAC on, so I get the following message: “The setup must update files or services that cannot be updated while the system is running.  If you choose to continue, a reboot will be required to complete the setup.”  However this is a lie because the StopServices and DeleteServices actions are before the RemoveFiles action in the sequence, so you never need to reboot.  Why do we need to scare the users like this?  Is there something wrong with my tables? Or am I missing something? This seems like a bug in Windows Installer to me.