This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SGN 7 uninstall error 1603: fnSaveCRAREA returned actual error code 1603

Hello at all,

 

I currently provide an uninstallation of SafeGuard Enterprise Client 7.00.1.2.

On the same machine I have 4 of 5 times an error during uninstall of Client with following information:

PrepareCleanUp:  Write success value name: EventMessageFile - value: C:\Windows\SGNCleanUp.exe
MSI (s) (80:30) [21:30:53:329]: Executing op: ActionStart(Name=SaveCRAREA.DDC9D041_01CA_426E_B0B1_C2EE76DEC2BA,,)
PrepareCleanUp:  Write success value name: TypesSupported - value: 7
MSI (s) (80:30) [21:30:53:329]: Executing op: CustomActionSchedule(Action=SaveCRAREA.DDC9D041_01CA_426E_B0B1_C2EE76DEC2BA,ActionType=3073,Source=BinaryData,Target=fnSaveCRAREA,)
MSI (s) (80:CC) [21:30:53:329]: Invoking remote custom action. DLL: C:\Windows\Installer\MSIC7FA.tmp, Entrypoint: fnSaveCRAREA
  Sat Mar 11 21:30:53: SGN-BE: fnSaveSGBEINSTAREA.
CustomAction SaveCRAREA.DDC9D041_01CA_426E_B0B1_C2EE76DEC2BA returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
MSI (s) (80:30) [21:30:53:345]: User policy value 'DisableRollback' is 0
MSI (s) (80:30) [21:30:53:345]: Machine policy value 'DisableRollback' is 0
Aktion beendet um 21:30:53: InstallFinalize. Rückgabewert 3.

The installed configuration package allows uninstall of clients.

 

What happens here?

How can resolve that issue?

 

Thanks a lot and

Kind regards

tralveller



This thread was automatically locked due to age.
  • Hello at all,

    I found the solution for problem. It's much more complicated.
    I try to explain this step by step.

    Please post a short comment, if it was helpful for you.

    Analysing:

    The error "fnSaveCRAREA" came at the second try to uninstall SGN Client.

    During analysing the first failed uninstallation of SGN by searching MSI log I found season why first uninstall permanently failed; see following Extract from log file:
    MSI (s) (E0:F0) [23:08:26:360]: Executing op: ActionStart(Name=DeinstallHMACDriver.31FC9F73_D305_4BDC_A841_00E2DDE98E8A,,)
    CustomAction DeinstallAESDriver.C92D5B99_9605_4E72_8EBE_D17DBAB02891 returned actual error code 1603 but will be translated to success due to continue marking
    MSI (s) (E0:F0) [23:08:26:360]: Executing op: CustomActionSchedule(Action=DeinstallHMACDriver.31FC9F73_D305_4BDC_A841_00E2DDE98E8A,ActionType=3073,Source=BinaryData,Target=DeinstallDriverCA,CustomActionData=CEHMACM)
    MSI (s) (E0:8C) [23:08:26:360]: Invoking remote custom action. DLL: C:\windows\Installer\MSID475.tmp, Entrypoint: DeinstallDriverCA
      Mon Oct 16 23:08:26: GetProperty (CustomActionData) returned (0) 'CEHMACM'
      Mon Oct 16 23:08:26: Entered DeInstallDriver for CEHMACM
      Mon Oct 16 23:08:26: DeleteService failed - Der angegebene Dienst wurde zum Löschen markiert. (0x430)
    CustomAction DeinstallHMACDriver.31FC9F73_D305_4BDC_A841_00E2DDE98E8A returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
    MSI (s) (E0:F0) [23:08:26:375]: User policy value 'DisableRollback' is 0
    MSI (s) (E0:F0) [23:08:26:375]: Machine policy value 'DisableRollback' is 0
    Aktion beendet um 23:08:26: InstallFinalize. Rückgabewert 3.

    => That says uninstall driver command was return 0x430, cause The specified service has been marked for deletion; the service will delete at next system startup.

    Then I checked how can I analyse the MSI itself to detect the routine "DeinstallHMACDriver.31FC9F73_D305_4BDC_A841_00E2DDE98E8A" and find out what exactly does this says.

    I used "Microsoft Orca" to open and find the rountine.

    In section "CustomAction" I found the entry with property:
    Action:                                                                                                   Type    Source                                                                                             Target
    DeinstallHMACDriver.31FC9F73_D305_4BDC_A841_00E2DDE98E8A    3073    CABinaryDrvInst.31FC9F73_D305_4BDC_A841_00E2DDE98E8A    DeinstallDriverCA   

    Important there is the "Type":
    My understanding is, that if return code of performed step is not successful, the MSI uninstall should failed.
    => Explanation found here:
    stackoverflow.com/.../windows-installer-strange-custom-actions
    mnikoo.com/.../
    the Type 3073 is result of following properties (as I could understand):
    1= Perform DLL action
    1024 = Execute a command
    2048 = Queues for execution at scheduled point within script


    NOW the joke of the matter:
    The uninstall driver command of DeinstallAESDriver, directly before starting of failed uninstall driver command "DeinstallHMACDriver.31FC9F73_D305_4BDC_A841_00E2DDE98E8A" I found following entry:
    MSI (s) (E0:F0) [23:08:26:344]: Executing op: CustomActionSchedule(Action=DeinstallAESDriver.C92D5B99_9605_4E72_8EBE_D17DBAB02891,ActionType=3137,Source=BinaryData,Target=DeinstallDriverCA,CustomActionData=CEAESM)
    MSI (s) (E0:A8) [23:08:26:344]: Invoking remote custom action. DLL: C:\windows\Installer\MSID464.tmp, Entrypoint: DeinstallDriverCA
      Mon Oct 16 23:08:26: GetProperty (CustomActionData) returned (0) 'CEAESM'
      Mon Oct 16 23:08:26: Entered DeInstallDriver for CEAESM
      Mon Oct 16 23:08:26: DeleteService failed - Der angegebene Dienst wurde zum Löschen markiert. (0x430)
    MSI (s) (E0:F0) [23:08:26:360]: Executing op: ActionStart(Name=DeinstallHMACDriver.31FC9F73_D305_4BDC_A841_00E2DDE98E8A,,)
    CustomAction DeinstallAESDriver.C92D5B99_9605_4E72_8EBE_D17DBAB02891 returned actual error code 1603 but will be translated to success due to continue marking

    => That says uninstall driver command was return 0x430, cause The specified service has been marked for deletion; the service will delete at next system startup.
    => BUT CONTINUE MSI uninstall

    Then I checked the routine "DeinstallAESDriver.C92D5B99_9605_4E72_8EBE_D17DBAB02891" and found out what exactly does this says.

    In section "CustomAction" I found the entry with property:
    Action:                                                                                               Type     Source                                                                                             Target
    DeinstallAESDriver.C92D5B99_9605_4E72_8EBE_D17DBAB02891    3137    CABinaryDrvInst.C92D5B99_9605_4E72_8EBE_D17DBAB02891    DeinstallDriverCA    

    Important there is the "Type":
    My understanding is, that if return code of performed step is not successful, the MSI continue uninstall.
    => Explanation found here:
    www.symantec.com/.../create-custom-actions-wise-macro
    the Type 3137 is result of following properties (as I could understand):
    1= This is a Type 1 custom action (DLL call)
    64 = Synchronous custom action, ignore exit code
    3072 (1024+2048)= Queues for execution at scheduled point within script. Executes with no user impersonation. Runs in system context as a deferred custom action.


    Error found:

    Sophos performed a wrong uninstall routine inside MSI...

    Through this error of failed uninstall driver at first uninstall, MSI tried to performed a rollback, but "fnSaveCRAREA" rollback was not successful. I think there are client specific information not available any more cause this information were already deleted.
    As end result next uninstall attempts will failed cause "fnSaveCRAREA" uninstall is not successful.


    Tried solution:

    Update Clients to latest for me available version 7.00.2.35 and then uninstall client
    => Same error, cause the same wrong uninstall routine is inside MSI...

    First I changed only one affected uninstall driver command to "3137"
    => Result: Return code is the same as in descripted "DeinstallAESDriver.C92D5B99_9605_4E72_8EBE_D17DBAB02891" uninstall driver command.
    => BUT next driver uninstall "DeinstallRNDDriver.05E87B42_E9D2_4A3B_8818_D22FFA5B2D3A" failed on same way as the AES driver.

    after after the fifth individual change and fail of next driver uninstall I decided to change ALL uninstall driver commands to "3137".

    Solution:

    1. Change all DeinstallXXXXXXDriver types inside 32 and 64 bit MSI's to "3137".
    For this open Orca, open MSI, switch in left panel "Tables" to "CustomAction", sort Custom Action by name with clicking on "Action" cell name.
    Then scroll down until you find first DeinstallXXXXXXXDriver entry.
    There you see, that first 4 drivers have set type "3137".
    Then you find entries with "3073" => CHANGE this to "3137"
    => Attention: At entry DelSGNReg.E82168B5_36B7_4920_8A2D_A40CF736188E and after: do not change anything!
    Safe modified MSI with "save as" (using transform file not working, cause "Type" value is "Read only" for transform file; transform file cannot overwrite "Type")

    Entries in Version 7.00.1.2 64 Bit:
    DeinstallDrvLCENC_FEDriver
    DeinstallDrvLCENC_FEDriverVista
    DeinstallDrvLCFILT_FEDriver
    DeinstallDrvLCFILT_FEDriverVista
    DeinstallDrvLCREC_FEDriver
    DeinstallDrvLCREC_FEDriverVista
    DeinstallFHMACDriver.9860CA18_9C1C_4810_A9F0_B81CB6787E5C
    DeinstallFRNDDriver.FE753A99_3F7C_43B6_97B3_A421854FCA9E
    DeinstallFSHADriver.8B1E10B4_7020_4452_9D1D_E510F3E27268
    DeinstallHMACDriver.31FC9F73_D305_4BDC_A841_00E2DDE98E8A
    DeinstallRNDDriver.05E87B42_E9D2_4A3B_8818_D22FFA5B2D3A
    DeinstallSGSTDrv.E788CE6B_DBA8_40F7_843F_F800232D70E2
    DeinstallSHADriver.16827452_CF97_4AC9_9629_E7396CC685AA
    DeinstallXTSAES128Driver.0B158E4B_3E83_47DB_9081_B6857489A998
    DeinstallXTSAES256Driver.298663FB_A06E_4783_910B_4E7A99981A5C

    Entries in Version 7.00.1.2 32 Bit:
    DeinstallDES3Driver.1C462033_8960_44D2_8847_CC8714BCC46D
    DeinstallDESDriver.59E48831_A772_4994_AD4F_5963018CEFD4
    DeinstallDrvLCENC_FEDriver
    DeinstallDrvLCENC_FEDriverVista
    DeinstallDrvLCFILT_FEDriver
    DeinstallDrvLCFILT_FEDriverVista
    DeinstallDrvLCREC_FEDriver
    DeinstallDrvLCREC_FEDriverVista
    DeinstallFDES3Driver.A6147578_5B4D_4898_B752_0B6C4FE4B60C
    DeinstallFHMACDriver.9860CA18_9C1C_4810_A9F0_B81CB6787E5C
    DeinstallFRNDDriver.FE753A99_3F7C_43B6_97B3_A421854FCA9E
    DeinstallFSHADriver.8B1E10B4_7020_4452_9D1D_E510F3E27268
    DeinstallHMACDriver.31FC9F73_D305_4BDC_A841_00E2DDE98E8A
    DeinstallIDEADriver.2DB8F2F2_44A2_443B_9F06_A7FFE35F0C72
    DeinstallIDEADriver.54800B17_E2CB_4A2B_85B8_77AAE8D4641B
    DeinstallRNDDriver.05E87B42_E9D2_4A3B_8818_D22FFA5B2D3A
    DeinstallSGSTDrv.E788CE6B_DBA8_40F7_843F_F800232D70E2
    DeinstallSHADriver.16827452_CF97_4AC9_9629_E7396CC685AA
    DeinstallXTSAES128Driver.0B158E4B_3E83_47DB_9081_B6857489A998
    DeinstallXTSAES256Driver.298663FB_A06E_4783_910B_4E7A99981A5C

    2. Replace the origin in C:\Windows\Installer with modified:
    Required, cause Windows Installer use origin MSI of already installed software in Windows folder. It wasn't possible to start MSI and "tell" him, that he has to use a MSI stored in an other location.

    3. Perform uninstall MSI with:
    MSIEXEC /X %SOFTWARE_MSI_CODE% /QN /NORESTART /Lvx+* "SGN_Client_uninstall_MSI.log"

    That's it!

     

    Automation:

    Cause I want to perform descripted steps automatically I created a batch skript, which:
    Check, if SGN is installed with any Windows account
    Check, with which Windows account was installed SGN by checking all available local users
    Find out where origin MSI is located in Windows folder
    Backup origin MSI
    Replace origin MSI file through modified MSI
    Extract MSI ProductCode through getting MSI uninstall string
    Remove "MSIEXEC /I" in uninstall string, cause we won't install software..
    Start uninstall
    => Cause an error occored during MSI uninstall, which disable all batch output into log file after end of MSI uninstall I performed uninstall with scheduled task and check if scheduled task is still working and after then check if uninstall was successful.
    => If success perform next steps
         => Restart system
    => Note: If uninstall fails, disbable "SafeGuard Authentication Service", else after reboot system perform endless boot loop until Service was disabled in Windows safe mode

    Additional information:

    I performed uninstall of all components at once:
    Copy first C:\Windows\SGBEInstArea.exe to other folder, cause after that it's not available, but in registry for next startup required (bug, too)
    Uninstall SafeGuard Management Center
    Uninstall SafeGuard Client Configuration
    Uninstall SafeGuard Client
    Uninstall SafeGuard Client Preinstall
    Wait 2 minutes
    Restore file to C:\Windows\SGBEInstArea.exe (requested in registry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\BootExecute)

    And performed reboot after that. The system perfomed between 2 and 3 times automatically.

     

    Notice:

    Workaround, of course, without any warranty or guarantee

     

    Batch Code:

    @ECHO OFF
    REM
    rem store batch file in same foleder as modified MSI
    REM
    REM Set files path to make script smaller
    SET CM_PATH=C:\Temp
    REM
    REM Task name during uninstallation
    SET SCHEDULED_TASK_NAME=SGN_Client_Uninstall
    REM
    REM
    IF "%PROCESSOR_ARCHITECTURE%"=="AMD64" GOTO ARCHITECTURE_64
    IF "%PROCESSOR_ARCHITECTURE%"=="x86" GOTO ARCHITECTURE_32
    REM
    REM If Achitecture not met the conditions, the script will be end with a error
    ECHO\
    GOTO ERROR_ARCHITECTURE
    REM
    :ARCHITECTURE_64
    SET ARC=64
    GOTO ARCHITECTURE_DETECTED
    :ARCHITECTURE_32
    SET ARC=32
    GOTO ARCHITECTURE_DETECTED
    :ARCHITECTURE_DETECTED
    REM
    REM
    :DEFINE_LANGUAGE
    REM Detect language in batch..
    DIR \ | FIND "Datei(en)" >NUL
    IF %ERRORLEVEL%==0 GOTO DEFINE_LANGUAGE_GERMAN
    DIR \ | FIND "File(s)" >NUL
    IF %ERRORLEVEL%==0 GOTO DEFINE_LANGUAGE_ENGLISCH
    REM Language (english or german) could not be detected..
    GOTO DEFINE_LANGUAGE_FAILED
    :DEFINE_LANGUAGE_GERMAN
    REM Language of current OS session is "german"..
    SET LANGUAGE_DE=1
    SET LANGUAGE_DISPLAY_NAME=german
    SET TASK_RESULT_TEXT=Letztes Ergebnis
    SET TASK_STILL_RUNNING_RESULT_YES=Wird
    REM ausgeführt
    GOTO DEFINE_LANGUAGE_END
    :DEFINE_LANGUAGE_ENGLISCH
    REM Language of current OS session is "english"..
    SET LANGUAGE_EN=1
    SET LANGUAGE_DISPLAY_NAME=english
    SET TASK_RESULT_TEXT=Last Result
    SET TASK_STILL_RUNNING_RESULT_YES=Running
    GOTO DEFINE_LANGUAGE_END
    :DEFINE_LANGUAGE_FAILED
    :DEFINE_LANGUAGE_END
    REM
    :SGN_CLIENT_X32_START
    ECHO\
    ECHO Search "Sophos SafeGuard Client" in registry
    REM Set aplication name
    SET _app=Sophos SafeGuard Client
    ECHO\
    ECHO Check in all listed users profiles to get MSI path, if someone has installed %_app%
    ECHO\
    SETLOCAL EnableDelayedExpansion
    FOR /f "tokens=8* delims=\" %%F IN ('REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData') DO (
     SET USERPATH=%%F
     SET PATH_FOUND=NO
     ECHO Chech if SafeGuard is listed inside users profile "!USERPATH!"
     FOR /F "tokens=*" %%A IN ('REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\!USERPATH!\Products\ /F "!_app!" /D /S 2^>NUL ^| FINDSTR /R /C:"HKEY_"') DO (
      FOR /F "tokens=2*" %%B IN ('REG Query "%%~A" /F LocalPackage /V /E ^| FIND /I " LocalPackage "') DO (
       SET MSI_PATH=%%C
       ECHO ^=^> "!_app!" Software string found; software seems to be installed..
       SET PATH_FOUND=YES
       REM For debugging
       REM ECHO PATH_FOUND is !PATH_FOUND!
       ECHO ^=^> Origin MSI path is: !MSI_PATH!
       ECHO\
       ECHO Rename/Move origin MSI "!MSI_PATH!" to "!MSI_PATH!.old"
       MOVE /Y "!MSI_PATH!" "!MSI_PATH!.old"
       IF !ERRORLEVEL!==0 (
        ECHO ^=^> Success, continue...
        ) ELSE (
        ECHO ^=^> Rename/Move failed, Return Code is: !ERRORLEVEL!
        )
       ECHO\
       ECHO Copy modified MSI to "C:Windows\installer\" directory, cause origin MSI methods are incorrect which will failed the uninstallation..
       COPY /Y SGNClient_x!ARC!_modified.msi "!MSI_PATH!"
       ECHO\
       :SGN_CLIENT_UNINSTALL
       FOR /F "tokens=*" %%A IN ('REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\!USERPATH!\Products\ /F "!_app!" /D /S 2^>NUL ^| FINDSTR /R /C:"HKEY_"') DO (
        REM echo x86: %%A
        FOR /F "tokens=2*" %%B IN ('REG Query "%%~A" /F UninstallString /V /E ^| FIND /I " UninstallString "') DO SET SOFTWARE_MSI_CODE=%%C
       )
       ECHO\
       ECHO Uninstall string is:
       ECHO !SOFTWARE_MSI_CODE!
       ECHO Change Uninstall String to cut install mark "/I"
       SET SOFTWARE_MSI_CODE=!SOFTWARE_MSI_CODE:~14!
       ECHO New Uninstall String is:
       ECHO !SOFTWARE_MSI_CODE!
       ECHO\
       ECHO Try to start uninstallation
       REM
       :SGN_CLIENT_UNINSTALL_START
       ECHO Start uninstallation of SGN Client via scheduled task:
       ECHO ^=^> Import Scheduled Task
       ECHO command is:
       ECHO SCHTASKS /CREATE /TN "!SCHEDULED_TASK_NAME!" /TR "'C:\Windows\System32\cmd.exe' '/C START /WAIT MSIEXEC /X!SOFTWARE_MSI_CODE! /QN /NORESTART /Lvx+* \"!CM_PATH!\SGN_Client_uninstall_MSI.log\"' /RU SYSTEM /SC ONCE /sd 01/01/2001 /st 00:00 /F 2>&1
       ECHO\
       SCHTASKS /CREATE /TN "!SCHEDULED_TASK_NAME!" /TR "'C:\Windows\System32\cmd.exe' '/C START /WAIT MSIEXEC /X!SOFTWARE_MSI_CODE! /QN /NORESTART /Lvx+* \"!CM_PATH!\SGN_Client_uninstall_MSI.log\"" /RU SYSTEM /SC ONCE /sd 01/01/2001 /st 00:00 /F 2>&1
       ECHO ^=^> Done..
       ECHO\
       REM Start Scheduled Task
       ECHO ^=^> Starting task !SCHEDULED_TASK_NAME! via Scheduled Task
       SCHTASKS /RUN /TN "!SCHEDULED_TASK_NAME!" 2>&1
       ECHO ^=^> Done..
       ECHO\
       ECHO ^=^> Wait 5 seconds
       REM Waiting for secure to make sure that Start of Scheduled Task is finished
       PING 127.0.0.1 -n 6 >NUL
       ECHO ^=^> Done..
       ECHO\
       :CHECK_SCHEDULED_TASK_START
       ECHO\
       ECHO Check if task is still running..
       FOR /F "tokens=2,*" %%A IN ('SCHTASKS /QUERY /FO LIST /V /TN !SCHEDULED_TASK_NAME! ^| Findstr /R /C:"Status:"') DO (
        SET TASK_STILL_RUNNING_RESULT=%%A
       )
       ECHO ^=^> Result is: "!TASK_STILL_RUNNING_RESULT!"
       IF !TASK_STILL_RUNNING_RESULT!==!TASK_STILL_RUNNING_RESULT_YES! (
        ECHO ^=^> Yes, task is still runnnig..
        ECHO\
        ECHO Wait 180 seconds..
        PING 127.0.0.1 -n 181 >NUL
        ECHO ^=^> Done..
        GOTO CHECK_SCHEDULED_TASK_START
        ) ELSE (
        ECHO ^=^> No, task seems to be ended, continue scripts..
        GOTO CHECK_SCHEDULED_TASK_END
       )
       :CHECK_SCHEDULED_TASK_END
       ECHO\
       ECHO Delete "!CM_PATH!\SGN_Client_uninstall_MSI.log"
       DEL /F "!CM_PATH!\SGN_Client_uninstall_MSI.log" 2>&1
       ECHO ^=^> Done..
       ECHO\
       ECHO Check result code of task
       FOR /F "tokens=3,*" %%A IN ('SCHTASKS /QUERY /FO LIST /V /TN !SCHEDULED_TASK_NAME! ^| Findstr /R /C:"!TASK_RESULT_TEXT!"') DO (
        SET TASK_RESULT_CODE=%%A
       )
       ECHO ^=^> Result is: "!TASK_RESULT_CODE!"
       SET MSIERRORLEVEL=!TASK_RESULT_CODE!
       IF !MSIERRORLEVEL!==0 (
        ECHO ^=^> Yes, Installation finished with Return Code "!MSIERRORLEVEL!"...
        GOTO SGN_CLIENT_UNINSTALL_END
       )
       IF !MSIERRORLEVEL!==1605 (
        ECHO ^=^> No, Installation failed with Return Code "!MSIERRORLEVEL!" that means is not installed any more...
        REM For case of rollback
        ECHO Perform rollback of files
        DEL /F !MSI_PATH! 2>&1
        MOVE /Y "!MSI_PATH!.old" "!MSI_PATH!"
        ECHO ^=^> Done..
        ECHO\
        GOTO SGN_CLIENT_UNINSTALL_END
       )
       IF !MSIERRORLEVEL!==1612 (
        ECHO ^=^> No, Installation failed with Return Code "!MSIERRORLEVEL!" that means installation scource is not available...
        REM For case of rollback
        ECHO Perform rollback of files
        DEL /F !MSI_PATH! 2>&1
        MOVE /Y "!MSI_PATH!.old" "!MSI_PATH!"
        ECHO ^=^> Done..
        ECHO\
        GOTO ERROR_UNINSTALL_SOURCE_UNAVAILABLE
       )
       IF !MSIERRORLEVEL!==3010 (
        ECHO ^=^> Yes, Installation finished with Return Code "!MSIERRORLEVEL!", but restart required...
        ) ELSE (
        ECHO ^=^> No, Installation failed with unknown Return Code "!MSIERRORLEVEL!"...
        REM For case of rollback
        ECHO Perform rollback of files
        DEL /F !MSI_PATH! 2>&1
        MOVE /Y "!MSI_PATH!.old" "!MSI_PATH!"
        ECHO ^=^> Done..
        ECHO\
        SET MSI_ERROR=!MSIERRORLEVEL!
        ECHO\
        GOTO ERROR_INSTALL
       )
       :SGN_CLIENT_UNINSTALL_END
       ECHO\
       ECHO Delete task !SCHEDULED_TASK_NAME! via Scheduled Task
       SCHTASKS /DELETE /TN "!SCHEDULED_TASK_NAME!" /F  2>&1
       ECHO ^=^> Done..
       REM Delete variable
       ECHO Delete SOFTWARE_MSI_CODE variables
       SET MSI_PATH=
       SET SOFTWARE_MSI_CODE=
       SET MSIERRORLEVEL=
       ECHO ^=^> Done..
       ECHO\
       REM
       )
      )
     IF !PATH_FOUND!==YES (
      ECHO Check next..
      ECHO\
      ) ELSE (
      ECHO No entry found..
      ECHO\
      )
     )
    ECHO No entry found..
    )
    ENDLOCAL
    ECHO\
    ECHO All listed users profiles has been checked, done..
    ECHO\
    ECHO All operations finished successful.
    ECHO Error Code / Error Level 3010
    ECHO End Skript Time Stamp:
    ECHO %DATE%, %TIME:~0,8%
    SET ERRORLEVEL=3010
    EXIT /B %ERRORLEVEL%
    ECHO\
    :ERROR_ARCHITECTURE
    ECHO ERROR!
    ECHO The architecture could not be detected!
    ECHO Recognized value is: "%PROCESSOR_ARCHITECTURE%"
    ECHO Please Check OS version and architecture
    ECHO Script aborted.
    ECHO Skript Time Stamp:
    ECHO %DATE%, %TIME:~0,8%
    EXIT /B 5020
    ECHO\
    :ERROR_UNINSTALL_SOURCE_UNAVAILABLE
    ECHO\
    ECHO ERROR!
    ECHO Can't uninstall software cause source is not available.
    ECHO Script aborted.
    ECHO Cancel installation...
    ECHO Restart OS and try again
    ECHO Skript Time Stamp:
    ECHO %DATE%, %TIME:~0,8%
    EXIT /B 1612
    ECHO\
    :ERROR_INSTALL
    ECHO\
    ECHO ERROR!
    ECHO MSI Uninstallation failed.
    ECHO Error Code / Error Level %MSI_ERROR%
    ECHO See logs for more details.
    ECHO Script aborted.
    ECHO Skript Time Stamp:
    ECHO %DATE%, %TIME:~0,8%
    SET ERRORLEVEL=%MSI_ERROR%
    EXIT /B %ERRORLEVEL%
    ECHO\