Reply to Thread

Post a reply to the thread: Checking Local Version to overwrite file

Your Message

Click here to log in

What's the name of our main installation product (in uppercase letters), directly followed by the current year?

 

You may choose an icon for your message from this list

Additional Options

  • Will turn www.example.com into [URL]http://www.example.com[/URL].

Topic Review (Newest First)

  • 09-22-2017, 12:57 PM
    linder

    Re: Checking Local Version to overwrite file

    Perfect! Thanks for the update, Steve.

    Friedrich
  • 09-22-2017, 10:10 AM
    steve@trimpos.net

    Re: Checking Local Version to overwrite file

    You are correct, I had the wrong flag set. Works great now, Thank you
  • 09-21-2017, 03:02 AM
    linder

    Re: Checking Local Version to overwrite file

    Steve,

    The "Detect Previous Version" function uses the Product GUID of previously distributed versions to determine if the application is installed on the client. It only works if the previous installation created a Product GUID (code) in the following section of the Windows registry:

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entVersion\Uninstall

    SetupBuilder automatically creates this item if the Add/Remove Programs Support option is enabled in the "General Information" Visualizer.

    The above installation information is a Windows development guidelines requirement.

    Friedrich
  • 09-21-2017, 02:59 AM
    linder

    Re: Checking Local Version to overwrite file

    Steve,

    please see my previous screenshot. You are using the wrong Condition. Please use "Version Less Than..." !!!

    Does this help?

    Friedrich
  • 09-20-2017, 01:34 PM
    steve@trimpos.net

    Re: Checking Local Version to overwrite file

    Ok after more testing, I am still having problems. To test I have the installer sending back what is set in the flag and displaying a message box. If I have the following (I know the flag is set to 23.01.25 as I have it showing in the heading):

    If %INSTALLED_VERSION% Less Than "23.01.26" Then
    Display Message Box ("Flag %INSTALLED_VERSION% is less than 23.01.26", "") [Noisy]
    End
    If %INSTALLED_VERSION% Equals "23.01.26" Then
    Display Message Box ("Flag %INSTALLED_VERSION% equal to 23.01.26", "") [Noisy]
    End
    If %INSTALLED_VERSION% Greater Than "23.01.26" Then
    Display Message Box ("Flag %INSTALLED_VERSION% more than 23.01.26", "") [Noisy]
    End

    I get no message boxes with the above, so I tried:

    If %INSTALLED_VERSION% Less Than or Equal "23.01.26" Then
    Display Message Box ("Flag %INSTALLED_VERSION% is less than 23.01.26", "") [Noisy]
    End
    If %INSTALLED_VERSION% Equals "23.01.26" Then
    Display Message Box ("Flag %INSTALLED_VERSION% equal to 23.01.26", "") [Noisy]
    End
    If %INSTALLED_VERSION% Greater Than or Equal "23.01.26" Then
    Display Message Box ("Flag %INSTALLED_VERSION% more than 23.01.26", "") [Noisy]
    End

    and I get both the attached message boxes.Attachment 4631Attachment 4632.

    Any ideas, I am baffled.
  • 09-20-2017, 11:04 AM
    steve@trimpos.net

    Re: Checking Local Version to overwrite file

    Where does the returned version come from?
    I have:
    Set Variable %DEV_VER% to FUNCTIONetect Previous Version ("{7D3B3610-30D4-11DD-66BB-048967B36443}")
    Set Variable %INSTALLED_VERSION% to "%_SB_RETURNEX%"

    If %INSTALLED_VERSION% Less Than "23.01.26" Then
    Install File(s) "C:\32bitpabp\Flashver23\data\UsPayTab.adt" to "%_SB_INSTALLDIR%\flash\data\UsPayTab.adt" [Feature:Always Install]
    Install File(s) "C:\32bitpabp\Flashver23\data\paytable.adi" to "%_SB_INSTALLDIR%\flash\data\paytable.adi" [Feature:Always Install]
    Install File(s) "C:\32bitpabp\Flashver23\data\paytable.adt" to "%_SB_INSTALLDIR%\flash\data\paytable.adt" [Feature:Always Install]
    End

    I have attached an image with what is set in registry:
    Attachment 4630
  • 09-20-2017, 03:42 AM
    linder

    Re: Checking Local Version to overwrite file

    Hi Steve,

    The "Detect Previous Version" function returns the path of a previously distributed version of your product.

    If the function succeeds, %_SB_RETURNEX% contains the installed version number (if available).

    I have attached a screenshot with a code snippet on how to handle it.

    Does this help?

    Friedrich
  • 09-19-2017, 09:05 AM
    steve@trimpos.net

    Checking Local Version to overwrite file

    I am using automatic updates (wupdate) and would like to install a new file only if the customer is on a version prior to 23.01.27 (the file will contain critical data if the customer is on a version after that). I have done the following:

    ! at top of script where all variables are registered:
    Set Variable %_SB_PARAM5% to FUNCTIONetect Previous Version ("{7D3B3610-30D4-11DD-66BB-048967B36443}")

    ! Under Install Files:

    If %_SB_PARAM5% Less Than or Equal "23.01.26" Then
    Install File(s) "C:\32bitpabp\Flashver23\data\UsPayTab.adt" to "%_SB_INSTALLDIR%\flash\data\UsPayTab.adt" [Feature:Always Install]
    Install File(s) "C:\32bitpabp\Flashver23\data\paytable.adi" to "%_SB_INSTALLDIR%\flash\data\paytable.adi" [Feature:Always Install]
    Install File(s) "C:\32bitpabp\Flashver23\data\paytable.adt" to "%_SB_INSTALLDIR%\flash\data\paytable.adt" [Feature:Always Install]
    End

    Even if I set the Local_Version flag in the registry to 23.01.27 the file is still overwritten. Any one know what I am missing?

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •