Visual C++ Developer Center > Visual C++ Forums > Visual C++ General > How can I deploy Visual Studio 2008 C Run-time Library in cab file?
Ask a questionAsk a question
 

QuestionHow can I deploy Visual Studio 2008 C Run-time Library in cab file?

  • Friday, January 25, 2008 1:20 AMPeterPan1120 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I maked a ActiveX and dlls that is required at ActiveX.

    These are builded with /MD(multi thread dll) option.

    So system is Visual Studio 2008 C Run-time Library.

    I will deploy these in cab file.

    How can I install Visual Studio 2008 C Run-time Library?

All Replies

  • Monday, March 31, 2008 6:00 PMpaul1069 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi Peter,

    This is how I have done it, the following is my .inf file (which as you know should also be in the cab file):

     

    [version]
      signature="$CHICAGO$"
      AdvancedINF=2.0

    [Add.Code]
      msvcr90.dll=msvcr90.dll
      msvcp90.dll=msvcp90.dll
      PlayerCtrl.dll=PlayerCtrl.dll
    ; CRT DLL
    [msvcr90.dll]
      hook=crt.cab_Installer
      FileVersion=9,0,21022,8

    ; C++RT DLL
    [msvcp90.dll]
      hook=crt.cab_Installer
      FileVersion=9,0,21022,8

    [crt.cab_Installer]
      file-win32-x86=vcredist_x86.cab
      run=%EXTRACT_DIR%\vcredist_x86.exe
     
    [PlayerCtrl.dll]
      file-win32-x86=thiscab
      clsid={A2A6189E-44F4-4D69-9CE4-8329312D2E3A}
      FileVersion=2,3,0,0
      RegisterServer=yes

     

    I've used the hook to run the vcredist_x86.exe which is the installer for CRT 9.0 available on MSDN for download. I've put the vcredist_x86.exe in another cab file. During installation the .exe will be extracted from it and executed as the user clicks through the installation.