Jump to content

Recommended Posts

Posted

Hello, i am trying to run a login script that uninstalls java but it takes a while as it checks for lots of versions, as it takes a while ideally i would like it to run invisibly. is there a way to do this or can anyone think of a better way to do it?

 

Thanks

Posted

Run it as a startup script? No reason not to.

 

You could run the script asynchronously so it doesn't delay login, but you could get problems with people logging in and immediately opening something Java.

Posted

Instead of checking for hundreds of versions one by one, why not use a wildcard instead? Something like this in PowerShell:

Get-WmiObject -Class win32_product | ? {$_.Name -like "*Java 7*"} | % {msiexec /x "$($_.IdentifyingNumber)" /qb /norestart | Out-Null}

 

That searches WMI for any software installation with "Java 7" in its name, gets its MSI identifying number and nukes it.

Posted
You can write uninstall scripts for almost anything. If you look in registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall on a PC with the software you intend to remove, look through the list of guids below this key until you find the software entry. There will be a key named uninstallstring. If you copy the content of this key and paste it into a batch file, you can automate the running of that script in a gpo and remove the software.
  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...