locked
App version written to registry from inf file RRS feed

  • Question

  • Hi.

    Using CabWiz to create installation cab for my application. Is there any way to add a variable for my application version to the AddReg key?

    I.e somthing like this:

    [DefaultInstall]
    CEShortcuts=Shortcuts
    CopyFiles=Files.Common, Help, Files.sv, Pictures
    AddReg=RegSettings
    
    [Strings]
    reg_path = Software\Company\My Application
    
    [RegSettings]
    HKLM,%reg_path%,Version,0x00010001,%AppVersion%
    

     where %AppVersion% automatically would add the new version of the application (which is determined when the cab file is created.

    Question 2:
    Is there a way to fix the same thing in a VS2008 deployment project?

    Thanks,

    Peter

    Friday, March 25, 2011 1:52 PM

Answers

  • On Fri, 25 Mar 2011 13:52:31 +0000, phartlen wrote:

    Hi.

    Using CabWiz to create installation cab for my application. Is there any way to add a variable for my application version to the AddReg key?

    You can create a setup dll, which can certainly modify the registry. For more info, see
    http://msdn.microsoft.com/en-us/library/aa924308.aspx

    I.e somthing like this:

    [DefaultInstall]
    CEShortcuts=Shortcuts
    CopyFiles=Files.Common, Help, Files.sv, Pictures
    AddReg=RegSettings
    
    [Strings]
    reg_path = Software\Company\My Application
    
    [RegSettings]
    HKLM,%reg_path%,Version,0x00010001,%AppVersion%
    

     where %AppVersion% automatically would add the new version of the application (which is determined when the cab file is created.
    Question 2: Is there a way to fix the same thing in a VS2008 deployment project?
    Thanks,
    Peter

    • Marked as answer by phartlen Saturday, March 26, 2011 6:57 AM
    Friday, March 25, 2011 8:02 PM

All replies

  • On Fri, 25 Mar 2011 13:52:31 +0000, phartlen wrote:

    Hi.

    Using CabWiz to create installation cab for my application. Is there any way to add a variable for my application version to the AddReg key?

    You can create a setup dll, which can certainly modify the registry. For more info, see
    http://msdn.microsoft.com/en-us/library/aa924308.aspx

    I.e somthing like this:

    [DefaultInstall]
    CEShortcuts=Shortcuts
    CopyFiles=Files.Common, Help, Files.sv, Pictures
    AddReg=RegSettings
    
    [Strings]
    reg_path = Software\Company\My Application
    
    [RegSettings]
    HKLM,%reg_path%,Version,0x00010001,%AppVersion%
    

     where %AppVersion% automatically would add the new version of the application (which is determined when the cab file is created.
    Question 2: Is there a way to fix the same thing in a VS2008 deployment project?
    Thanks,
    Peter

    • Marked as answer by phartlen Saturday, March 26, 2011 6:57 AM
    Friday, March 25, 2011 8:02 PM
  • Thanks!

     

    Although not as simple as I was hoping it should be :)

    Saturday, March 26, 2011 6:57 AM