Page 1 of 1

[SOLVED] Uninstalling the Brave browser

Published: October 24, 2022 - 3:36 PM
by Stenon
Hello,

I'm trying to uninstall the "Brave" package (created using Package Template), but unfortunately it requires an action, and I haven't found a silent option... Do you have any ideas?

Many thanks in advance,
Samuel

Re: Uninstalling the Brave browser

Published: October 24, 2022 - 4:45 PM
by sfonteneau
https://silentinstallhq.com/brave-brows ...-to-guide/

Here it says:

Code: Select all

"%ProgramFiles%\BraveSoftware\Brave-Browser\Application\w.x.y.z\Installer\setup.exe" --uninstall --system-level --force-uninstall

Re: Uninstalling the Brave browser

Published: October 25, 2022 - 8:36 AM
by Stenon
Thank you, it works!
And here is my code for the road:

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *

def install():
    # Declaring local variables

    # Installing the software
    print("Installing: Brave_installer-x64.exe")
    install_exe_if_needed('brave_installer-x64.exe',
        silentflags='--install --silent --system-level',
        key='BraveSoftware Brave-Browser',
        min_version='1.3.361.133'
    )

def uninstall():
    def killsoft():
      soft = "BRAVE"
      if isrunning(soft):
        print ("closing %s" % soft)
        killalltasks(soft)
    killsoft()
    uninstaller_dir = makepath(programfiles, "BraveSoftware", "Brave-Browser", "Application", "106.1.44.112", "Installer")
    uninstaller_path = makepath(uninstaller_dir, "setup.exe")
    run('"%s" --uninstall --system-level --force-uninstall' % uninstaller_path,accept_returncodes=[3,19])