Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Eeek - my app has disappeared

  1. #1

    Default Eeek - my app has disappeared

    My app has disappeared along with all my data. I know why but need an urgent
    fix. I have to say it is probably of my own making.

    Following JP's advice (and I am not blaming him <g>) I created a custom
    uninstall. I tested it rigorously in all scenarios and it worked fine.
    Pretty simple stuff:

    ! Get the registry install and data paths
    Set Variable %INSTALL_PATH% to FUNCTION:Get Registry Key Value("Install
    Path") from "HKEY_LOCAL_MACHINE\Software\Ambrit Software\Dentists Manager"
    Set Variable %INSTALL_DATA_PATH% to FUNCTION:Get Registry Key Value("Data
    Folder") from "HKEY_LOCAL_MACHINE\Software\Ambrit Software\Dentists Manager"

    ! --- Process uninstall queue ---
    Process Uninstall Queue

    ! Delete the remaining folders and files including registry entries
    Delete Tree "%INSTALL_PATH%"
    Delete Tree "%INSTALL_DATA_PATH%"
    Edit Registry (Remove key and all subkeys) "HKLM\Software\Ambrit
    Software\Dentists Manager"=
    Edit Registry (Remove key and all subkeys) "HKCU\Software\Ambrit
    Software\Dentists Manager"=

    The thing is I performed a web update within my app. This closed down my
    application as it should but failed at about 75%. No idea why but that's not
    important. SB asked me if I wanted to rollback the changes to which I said
    YES as you would.

    When this has happened before (without a custom uninstall) it was not a
    problem but now the custom uninstall has clearly been actioned and has done
    what it should I suppose.

    So how do I prevent this custom uninstall running in a scenario where there
    is a rollback?

    Friedrich, I know you do not support custom un installs but I did not change
    the standard one created by SB other than wrapping the Process Uninstall
    Queue with the lines.

    Many thanks

    John

  2. #2

    Default Re: Eeek - my app has disappeared

    Hi John,

    > My app has disappeared along with all my data. I know why but need an
    > urgent fix. I have to say it is probably of my own making.

    Yes, it's of your own making ;-) You instruct the uninstall to remove the
    database folder tree, etc. whenever the uninstall processes uninstall
    actions.

    > So how do I prevent this custom uninstall running in a scenario where
    > there is a rollback?

    See attached screenshot. Check if the uninstall is running in "smart
    rollback" mode. If this is the case (%ROLLBACK_MODE% variable is set to
    "1"), do not execute your custom uninstall stuff.

    Friedrich
    Attached Images Attached Images  

  3. #3

    Default Re: Eeek - my app has disappeared

    Or this (see attached screenshot) in your custom uninstall script:

    Friedrich
    Attached Images Attached Images  

  4. #4

    Default Re: Eeek - my app has disappeared

    Thanks Friedrich - I wonder if JP is aware of this!!

    John

  5. #5

    Default Re: Eeek - my app has disappeared

    Now he is

    Thanks both for this tip

    --
    JP
    __________________________________________________ _____

    For those who do not understand ... : "Qui bene amat bene castigat."
    __________________________________________________ _____

    DMC - Data Management Center : a tool to let you Migrate Import Export
    Transfer your Data
    www.dmc-fr.com

  6. #6

    Default Re: Eeek - my app has disappeared

    Hello Fredrich,

    You mean this as custom uninstall script ?

    !
    //////////////////////////////////////////////////////////////////////////////////////////////////

    #pragma UNINSTALL = "1"

    Set Variable %ROLLBACK_MODE% to "0"
    Set Variable %UNINSTALL_COMMANDLINE% to FUNCTION:Get System
    Info(Command Line)
    If %UNINSTALL_COMMANDLINE% Contains "/UR" Then
    Set Variable %ROLLBACK_MODE% to "1"
    End

    If %_SB_INSTALLERFLAG% Does Not Equal "1" on Position
    "$SB_SILENTMODEFLAG$" Then
    Display Message Box "#UNINST_CONFIRM#" -- "#UNINST_HEADING#"
    Else
    Set Variable %_SB_RETURN% to "$IDYES$"
    End

    If %_SB_RETURN% Equals "$IDYES$" Then
    ! Get registry values on PATHS
    Set Variable %INSTALL_PATH% to FUNCTION:Get Registry Key
    Value("Directory Installation") from
    "HKEY_LOCAL_MACHINE\SOFTWARE\CGF\Data Management Center"
    Set Variable %INSTALL_DATA_PATH% to FUNCTION:Get Registry Key
    Value("Directory Data") from "HKEY_LOCAL_MACHINE\SOFTWARE\CGF\Data
    Management Center"

    ! --- Process uninstall queue ---
    Process Uninstall Queue

    ! Delete all folders and keys
    Delete Tree "%INSTALL_DATA_PATH%"
    Delete Tree "%INSTALL_PATH%"
    Edit Registry (Remove key and all subkeys) "HKCU\SOFTWARE\CGF"=
    Edit Registry (Remove key and all subkeys) "HKLM\SOFTWARE\CGF"=

    If %_SB_ERRORCODE% Equals "0" And %_SB_INSTALLERFLAG% Does Not Equal
    "1" on Position "1" Then
    Display Message Box "#UNINST_FINISH#" -- "#UNINST_HEADING#"
    End
    End

    Merci
    (cheking to be sure I do not do a blunder)

    --
    JP
    __________________________________________________ _____

    For those who do not understand ... : "Qui bene amat bene castigat."
    __________________________________________________ _____

    DMC - Data Management Center : a tool to let you Migrate Import Export
    Transfer your Data
    www.dmc-fr.com

  7. #7

    Default Re: Eeek - my app has disappeared

    Hi JP,

    As far as I can see, you only set the %ROLLBACK_MODE% value, but you do not
    really "use" it.

    For example, if you don't want to execute your custom uninstall actions in
    case of a smart rollback scenario:

    If %ROLLBACK_MODE% Does Not Equal "1" Then
    ! Delete all folders and keys
    ! Yada yada
    End

    Friedrich

  8. #8

    Default Re: Eeek - my app has disappeared

    So now it looks like this :


    #pragma UNINSTALL = "1"

    Set Variable %ROLLBACK_MODE% to "0"
    Set Variable %UNINSTALL_COMMANDLINE% to FUNCTION:Get System
    Info(Command Line)
    If %UNINSTALL_COMMANDLINE% Contains "/UR" Then
    Set Variable %ROLLBACK_MODE% to "1"
    End

    If %_SB_INSTALLERFLAG% Does Not Equal "1" on Position
    "$SB_SILENTMODEFLAG$" Then
    Display Message Box "#UNINST_CONFIRM#" -- "#UNINST_HEADING#"
    Else
    Set Variable %_SB_RETURN% to "$IDYES$"
    End

    If %_SB_RETURN% Equals "$IDYES$" Then
    ! Get registry values on PATHS
    Set Variable %INSTALL_PATH% to FUNCTION:Get Registry Key
    Value("Directory Installation") from
    "HKEY_LOCAL_MACHINE\SOFTWARE\CGF\Data Management Center RT"
    Set Variable %INSTALL_DATA_PATH% to FUNCTION:Get Registry Key
    Value("Directory Data") from "HKEY_LOCAL_MACHINE\SOFTWARE\CGF\Data
    Management Center RT"

    ! --- Process uninstall queue ---
    Process Uninstall Queue

    ! Delete all folders and keys
    If %ROLLBACK_MODE% Does Not Equal "1" Then
    Delete Tree "%INSTALL_DATA_PATH%"
    Delete Tree "%INSTALL_PATH%"
    Edit Registry (Remove key and all subkeys) "HKCU\SOFTWARE\CGF"=
    Edit Registry (Remove key and all subkeys) "HKLM\SOFTWARE\CGF"=
    End

    If %_SB_ERRORCODE% Equals "0" And %_SB_INSTALLERFLAG% Does Not Equal
    "1" on Position "1" Then
    Display Message Box "#UNINST_FINISH#" -- "#UNINST_HEADING#"
    End
    End


    Sorry fir the bother but trying to understand
    BTW what does UR/ mean please ?
    I did not know the commandline was used for an uninstall so "grasping"
    your tips here

    --
    JP
    __________________________________________________ _____

    For those who do not understand ... : "Qui bene amat bene castigat."
    __________________________________________________ _____

    DMC - Data Management Center : a tool to let you Migrate Import Export
    Transfer your Data
    www.dmc-fr.com

  9. #9

    Default Re: Eeek - my app has disappeared

    Hi JP,

    >
    > So now it looks like this :
    >

    Looks good This will not execute the custom uninstall actions if the
    uninstall is running in "rollback" mode.

    > Sorry fir the bother but trying to understand
    > BTW what does UR/ mean please ?
    > I did not know the commandline was used for an uninstall so "grasping"
    > your tips here

    /UR is the command line switch that lets you set the uninstall into smart
    rollback mode (see attached screenshot). The installer uses this switch to
    rollback a "failed" install.

    Friedrich
    Attached Images Attached Images  

  10. #10

    Default Re: Eeek - my app has disappeared

    Merci Monsieur

    So the uninstaller is run from command line from the add remove
    programs ?

    Reading the advanced tab in project properties I am wondering :

    option : 'remove installer after successful Installation'
    option : 'remove uninstaller after successsful Installation'

    is there not something wrong on this second option ?? I do not
    understand why one would want to remove the uninstaller after a
    successful INSTALLATION ?

    should it not be uninstallation ? ;o)

    --
    JP
    __________________________________________________ _____

    For those who do not understand ... : "Qui bene amat bene castigat."
    __________________________________________________ _____

    DMC - Data Management Center : a tool to let you Migrate Import Export
    Transfer your Data
    www.dmc-fr.com

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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