Scripted uninstallation
-
MF13tch last edited by
Hi -
I work in Education.
We have a fleet of machines where a lot of the devices have ended up with Opera / Opera GX installed on them (basically because the kids at some point had admin rights - or didn't even need admin rights to install it) and we really don't want it as it violates many of the school internet safety policies.
Can anyone provide a comprehensive guide on remotely uninstalling opera on Windows devices using powershell/batch scripting.
Thanks.
Good browser by the way - great product, just not suitable for our environment.
-
burnout426 Volunteer last edited by burnout426
The uninstall command looks like this in a command prompt or task:
"%LocalAppData%\Programs\Opera GX\opera.exe" --uninstall --runimmediately --deleteuserprofile=1
and
"%LocalAppData%\Programs\Opera\opera.exe" --uninstall --runimmediately --deleteuserprofile=1
when Opera GX and Opera were installed for the current user and you run the command as that user.
If Opera was installed for all users, it'd look like this:
"%ProgramFiles%\Opera GX\opera.exe" --uninstall --runimmediately --deleteuserprofile=1
and
"%ProgramFiles%\Opera\opera.exe" --uninstall --runimmediately --deleteuserprofile=1
or for 32-bit Operas:
"%ProgramFiles(x86)%\Opera GX\opera.exe" --uninstall --runimmediately --deleteuserprofile=1
and
"%ProgramFiles(x86)%\Opera\opera.exe" --uninstall --runimmediately --deleteuserprofile=1
where the command is run with admin privledges.
You can omit
--deleteuserprofile=1
if you don't want to wipe their data.When the uninstall command runs, there will be a dialog that shows up showing the progress of the uninstall and then it will disappear. There used to be a
--silent
switch you could use to hide that, but Opera removed support for it.Also see https://reddit.com/r/operabrowser/wiki/opera/clean_opera_from_windows/ for info on where Opera stores everything just in case the uninstall command method doesn't work out and you need to write a bunch of commands to take care of each thing.
Not a comprehensive guide, but something.
-
XzavierHowell Banned last edited by
@MF13tch said in Scripted uninstallation:
Hi -
I work in Education.
We have a fleet of machines where a lot of the devices have ended up with Opera / Opera GX installed on them (basically because the kids at some point had admin rights - or didn't even need admin rights to install it) and we really don't want it as it violates many of the school internet safety policies.
Can anyone provide a comprehensive guide on remotely uninstalling opera on Windows devices using powershell/batch scripting.To address the issue of uninstalling Opera and Opera GX remotely from a fleet of machines in an educational environment, you can use a combination of PowerShell and batch scripting to automate the process. First, you’ll need to identify the software’s uninstall strings. You can do this by querying the registry using PowerShell to locate the GUID associated with Opera or Opera GX. Once you have the correct uninstall strings, you can create a script that loops through the devices to uninstall the browsers. You may also want to use Group Policy to restrict users from installing software in the future, ensuring that only authorized applications are added to the devices. To perform this task remotely, you can leverage tools such as PSExec or PowerShell Remoting to deploy the uninstall script across multiple machines. By automating this process, you can ensure compliance with school internet safety policies and maintain better control over the software installed on your network.