Wednesday, July 24, 2013

Quote of the Month:

"Java was having issues, so I re-installed Photoshop and it didn't help"

Tuesday, July 9, 2013

Uninstall BMC Remedy 7.x via SCCM 2012

I'm obviously working late tonight.  Here's another tricky one: Remedy 7.x.  We recently upgraded to Remedy 8.1, and yes we're still way behind.  But here we are.  With 8.X we didn't license for thick clients, we're all web based now.  And what's left after the upgrade is this Remedy client that doesn't do anything left on (according to my collection) 782 machines.  I'm not going to uninstall that many manually.

So you need two files.  1) Options.txt, and 2) UninstallRemedy7.bat.  Put them both in the same folder and make it your soufce directory for SCCM.

-P installLocation=C:\Program Files (x86)\BMC Software\ARSystem
-U productARSuiteKit

UninstallRemedy7.bat (the following is one line)
start "" "c:\Program Files (x86)\BMC Software\ARSystem\UninstallBMCARSystem\uninstall.exe" -i silent -DOPTIONS_FILE=\\<hostserver>\software\Uninstall_Remedy_7\options.txt

That's it.  Your program just points to the .bat and is ran as admin.  And just because I have a few minutes, here is the query for the collection that I'm using:

SMS_R_System inner join
SMS_G_System_INSTALLED_SOFTWARE.ProductName like "BMC Remedy Action Request System 7%"



Also worth a note, 7.x installs to program files (x86) vs. 8.x which installs to program files in every case I've looked at (our Dev's have the console).  So even though the above bat/txt would uninstall 8.x, it's hard coded to (x86) so it 'shouldn't'.  I'll find out tonight :)
Wow, why am I just now seeing this:

SCCM 2012 ConfigMgr Survival Guide (via Technet)

Uninstalling non-admin install of Google Chrome

EDIT:  I've heard that some folks are having issues with this process.  I'm currently working on a PowerShell script to run this as system (ie. from System Center or PSExec -s) which will fix a couple things.

EDIT 2: The new version is here:

This was a fun one.  If a non-privledged user goes to they can get it installed.  I'm not going to tell you how, but leave it to our usrs to find a way.  BTW, I like Chrome and Google as a whole, but I don't need the headache of supporting custom web applications through yet another browser so it had to go.

Since the user isn't privledged, it can't be installed in Program Files.  So the user's profile is used. 
I tried something fancy like:
for /D %%G In (%userprofile%\AppData\Local\Google\Chrome\Application\*Do %%G\Installer\setup.exe --uninstall --multi-install --chrome --verbose-logging --force-uninstall

Yes the double dash is needed for the chrome setup.exe.

But 1) that has to run for each user, and 2) it was unreliable, and 3) I don't like it because a user might leave and never come back and I'm stuck looking at a report with his software one it.  My OCD can't stand that.  So I found a link on Google that has all the registry keys that Chrome installs.  Time to undo those:

Windows Registry Editor Version 5.00








[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome]







Kick it off via a batch file, which can also do some cleanup.
@echo off
regedit.exe /s ~dp0RegEntries.reg
IF EXIST "C:\Users\" (
for /D %%G in ("C:\Users\*") do (
rmdir /s /q "%%G\AppData\Local\Google\Chrome"
        del /f /s /q "%%G\Desktop\Google Chrome.lnk")
Put the batch and .reg file in the same folder, and advertise out the .batch file through SCCM 2012 as a package.