Uninstalled a program via PowerShell script, but it still shows up in Programs and Features
I wrote a script that uninstalls a program just fine, but it still shows up in Programs and Features due to its entries still existing in the Registry.
Here is a portion of my script:
Start-Process
-FilePath MsiExec
-ArgumentList "/X$($MyProgram.ProdID)",
'/quiet'
-NoNewWindow -Wait
-PassThru
I believe the reason it is still showing up in Programs and Features is because I am missing some MsiExec switch to instruct it to be removed. I vaguely recall dealing with this about two years ago and I wrote a script that did exactly this, but now I completely
forgot what it was.
Can someone help me out here, please?
Thank you
I realize that, but honestly don't know where else to submit a question like this in the forums? Also, the vendor is Microsoft. What I am trying to uninstall is any Forefront component, because when I deployed the SCEP client via SCCM 2012 the SCEP client
was not able to uninstall some of the Forefront components.
Here is my script:
$NewLine = "`r`n"
$NewLine
Write-Output "Please wait ..."
#region ---------- Declare WMI Variables to be Used ----------
$CM12R2ClientInstalled = Get-WmiObject -Class Win32_Product |
Where-Object -FilterScript { $_.Name -eq "Configuration Manager Client" -and $_.Version -ge "5.00.7958.1000" }
$FCSInstalled = Get-WmiObject -Class Win32Reg_AddRemovePrograms |
Where-Object -FilterScript { $_.DisplayName -match "Forefront" }
$SCEPInstalled = Get-WmiObject -Class Win32Reg_AddRemovePrograms |
Where-Object -FilterScript { $_.DisplayName -eq "System Center Endpoint Protection" }
#endregion ---------- Declare Variables to be Used ----------
#region --------- Check if the SCCM 2012 R2 Client is Installed ---------
$CM12ClientService = Get-Service -Name CcmExec
If (($CM12R2ClientInstalled -ne $null) -and ($CM12ClientService -ne $null))
$NewLine
Write-Output "The $($CM12R2ClientInstalled.Name) $($CM12R2ClientInstalled.Version) is installed on $($env:COMPUTERNAME)"
#endregion --------- Check if the SCCM 2012 R2 Client is Installed ---------
#region -------- Uninstall any Forefront Component if any are Installed ---------
If ($FCSInstalled)
$NewLine
Write-Output "The following Forefront component(s) are installed on $($env:COMPUTERNAME):"
$NewLine
$FCSInstalled.DisplayName
Foreach ($FCS in $FCSInstalled)
$NewLine
Write-Output "Preparing to uninstall $($FCS.DisplayName)"
$UninstallFCS = Start-Process -FilePath MsiExec -ArgumentList "/X$($FCS.ProdID)", 'REMOVEDATA=1' -NoNewWindow -Wait -PassThru
If ($($UninstallFCS.ExitCode) -eq '0')
$NewLine
Write-Output "$($FCS.DisplayName) uninstalled successfully!"
$NewLine
#endregion -------- Uninstall any Forefront Component if any are Installed ---------
#region --------- Install the SCEP Client if it is Not Installed ----------
If ($SCEPInstalled -eq $null)
$NewLine
Write-Output "The System Center Endpoint Protection client is not installed on $($env:COMPUTERNAME)"
$InstallSCEP = Start-Process -FilePath "C:\Windows\ccmsetup\SCEPInstall.exe" -ArgumentList '/s', '/q', '/NoSigsUpdateAtInitialExp', '/policy "C:\Windows\CCM\EPAMPolicy.xml"' -NoNewWindow -Wait -PassThru
If ($($InstallSCEP.ExitCode) -eq '0')
$NewLine
Write-Output "System Center Endpoint Protection installed successfully!"
$NewLine
Else
$NewLine
Write-Warning -Message "System Center Endpoint Protection failed to install on $($env:COMPUTERNAME) with exit error: $($InstallSCEP.ExitCode)"
$NewLine
#endregion --------- Install the SCEP Client if it is Not Installed ----------
Else
$NewLine
Write-Output "The System Center Endpoint Protection client is already installed on $($env:COMPUTERNAME)!"
$NewLine
Else
$NewLine
Write-Warning -Message "$($FCS.DisplayName) failed to uninstall on $($env:COMPUTERNAME) with exit error: $($UninstallFCS.ExitCode)"
$NewLine
Else
$NewLine
Write-Output "No Forefront components are installed on $($env:COMPUTERNAME)!"
#region ---------- Install the SCEP Client if it is NOT Installed ----------
If ($SCEPInstalled -eq $null)
$NewLine
Write-Output "The System Center Endpoint Protection client is not installed on $($env:COMPUTERNAME)"
$InstallSCEP = Start-Process -FilePath "C:\Windows\ccmsetup\SCEPInstall.exe" -ArgumentList '/s', '/q', '/NoSigsUpdateAtInitialExp', '/policy "C:\Windows\CCM\EPAMPolicy.xml"' -NoNewWindow -Wait -PassThru
If ($($InstallSCEP.ExitCode) -eq '0')
$NewLine
Write-Output "System Center Endpoint Protection installed successfully!"
$NewLine
Else
$NewLine
Write-Warning -Message "System Center Endpoint Protection failed to install on $($env:COMPUTERNAME) with exit error: $($InstallSCEP.ExitCode)"
$NewLine
#endregion --------- Install the SCEP Client if it is Not Installed ----------
Else
$NewLine
Write-Output "The System Center Endpoint Protection client is already installed on $($env:COMPUTERNAME)!"
$NewLine
Else
$NewLine
Write-Output "The System Center Configuration Manager 2012 R2 client is not installed on $($env:COMPUTERNAME)!"
$NewLine
Similar Messages
-
How do I uninstall Mackeeper? I have dragged it into trash, but it still showing in systems information and causing problems!
Please adviseHow to uninstall MacKeeper - updated
How to Remove MacKeeper
Uninstalling Software: The Basics
Most OS X applications are completely self-contained "packages" that can be uninstalled by simply dragging the application to the Trash. Applications may create preference files that are stored in the /Home/Library/Preferences/ folder. Although they do nothing once you delete the associated application, they do take up some disk space. If you want you can look for them in the above location and delete them, too.
Some applications may install an uninstaller program that can be used to remove the application. In some cases the uninstaller may be part of the application's installer, and is invoked by clicking on a Customize button that will appear during the install process.
Some applications may install components in the /Home/Library/Applications Support/ folder. You can also check there to see if the application has created a folder. You can also delete the folder that's in the Applications Support folder. Again, they don't do anything but take up disk space once the application is trashed.
Some applications may install a startupitem or a Log In item. Startupitems are usually installed in the /Library/StartupItems/ folder and less often in the /Home/Library/StartupItems/ folder. Log In Items are set in the Accounts preferences. Open System Preferences, click on the Accounts icon, then click on the LogIn Items tab. Locate the item in the list for the application you want to remove and click on the "-" button to delete it from the list.
Some software use startup daemons or agents that are a new feature of the OS. Look for them in /Library/LaunchAgents/ and /Library/LaunchDaemons/ or in /Home/Library/LaunchAgents/.
If an application installs any other files the best way to track them down is to do a Finder search using the application name or the developer name as the search term. Unfortunately Spotlight will not look in certain folders by default. You can modify Spotlight's behavior or use a third-party search utility, EasyFind, instead.
Some applications install a receipt in the /Library/Receipts/ folder. Usually with the same name as the program or the developer. The item generally has a ".pkg" extension. Be sure you also delete this item as some programs use it to determine if it's already installed.
There are many utilities that can uninstall applications. Here is a selection:
1. AppZapper
2. AppDelete
3. Automaton
4. Hazel
5. AppCleaner
6. CleanApp
7. iTrash
8. Amnesia
9. Uninstaller
10. Spring Cleaning
For more information visit The XLab FAQs and read the FAQ on removing software. -
I
WANT TO UNINSTALL ELEMENTS 10 ON WINDOWS 8 BUT IT IS NOT SHOWN UNDER PROGRAMMES AND FEATURES SO HOW DO i DO IT PLEASE?iPlease post Photoshop Elements related queries over at
http://forums.adobe.com/community/photoshop_elements
But please not all-caps. -
Iphoto library gave message it had inconsistencies. I clicked the button to complete the changes and it shows & says it is 100% complete. The message won't clear and it is still running the app but it is completely frozen and won't let me do anything.
Help pleasehttp://support.apple.com/kb/HT2638
if all else fails try http://www.fatcatsoftware.com/iplm/ -
Hey Scripting Guys,
I have been in and out of Powershell last few years, not that great at it tbh !!! I'm looking for advice on how I can as in Title, Create a Powershell script to Scan Active Directory Attributes for Country and Department ,Then add to Group then add to Distribution
list based on Region/Country
I was thinking along the lines of get-aduser -LDAPFilter "(department=SALES France) and adding a where clause for country.
Any help would be great.
DecSo I have tried a few variations but get errors on both
get-aduser -LDAPFilter "(&(department=SALES)(c=us))" | Add-ADPrincipalGroupMembership -MemberOf "testgroup"
get-aduser -LDAPFilter "(&(department=SALES)(c=fr))" | Add-ADGroupMember -identity "testgroup"
Add-ADPrincipalGroupMembership : Object reference not set to an instance of an
object.
At line:1 char:86
+ get-aduser -LDAPFilter "(&(department=SALES)(c=fr))" | Add-ADPrincipalGroupMe
mbership <<<< -MemberOf "testgroup"
+ CategoryInfo : NotSpecified: (:) [Add-ADPrincipalGroupMembershi
p], NullReferenceException
+ FullyQualifiedErrorId : Object reference not set to an instance of an ob
ject.,Microsoft.ActiveDirectory.Management.Commands.AddADPrincipalGroupMem
bership -
I have an icloud account which I can access via the web but when I go to systems preferences and click on the icloud it sends me to the mobileme closed site?? How do I get it to go to my icloud log in?
You're saying that when you click on the iCloud preference pane button it sends you to the defunct MMe
rather than giving you this?
Is your profile up to date, i.e. are your running 10.7.5? Make sure you click on the iCloud button and not the MMe button.
OT -
I have an iphone 4 , but it still has the ios 4 , and i want to upgrade it to a newer version , but when I try to do it via Itunes it says there's a problem with the internet (and the internet it's working fine) and it won't work ,how can i upgrade?
try rebooting your computer.
-
I want to uninstall Elements 10 but it is not shown under Programmes and features in my Windows 8. How do I do it please?
See if this helps:
https://helpx.adobe.com/photoshop-elements/kb/manually-remove-photoshop-elements-10.html -
I having the error message of "Firefox has Stopped working" and having following problems list out in the problem list text area is
Problem signature:
Problem Event Name: APPCRASH
Application Name: firefox.exe
Application Version: 20.0.1.4847
Application Timestamp: 51650aee
Fault Module Name: KERNELBASE.dll
Fault Module Version: 6.1.7600.16385
Fault Module Timestamp: 4a5bdaae
Exception Code: c0000005
Exception Offset: 00007b69
OS Version: 6.1.7600.2.0.0.256.1
Locale ID: 16393
Additional Information 1: 59d2
Additional Information 2: 59d28f4851ee3e61e3aa57edc696ac9e
Additional Information 3: 38b6
Additional Information 4: 38b6ae8359371108855a2a4e84f0ea47
Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409
If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt
i uninstall and delete the mozilla firfox in my directory and reinstall tha lastest version but its still showing the same error message.i experienced the same problem. this is what i did:
*right click firefox
*click properties
*click compatibility tab
* check "Run this program in compatability mode for:"
* on dropdown choose Windows 7.
* click ok or apply.
this solution solved my problem.i hope it will work on yours too. -
How do I clean up mail in my icloud? I have already deleted old mail (from all my e-mail accounts) on all devices, and emptied the junk & deleted files, but it still shows that I am at max on my icloud. What do I do to free up space? (photos & apps do not take up that much room). When I go to manage storage on any device & it will display how much room each program or app is using, it still shows that my e-mail is taking up the most room. Is there a way to actually log on to the icloud server to manage what it stored there? If so, how do I do it? Also, on a related subject, why does my mail not sync accross all devices? ie. when I delete an email on one device, why do I still see it on all my other devices? How can I change this?
I have an iphone5, ipad2, ipod 4th gen, ipod 3rd gen, all running on my same apple id - but I have a PC not a Mac home computer - is this part of the problem? Looking to upgrade to a Mac sometime this year...
Thank-you for the help!beckyfromoz wrote:
I do have the Time Capsule and spoke to Apple Care here in Sydney about it yesterday. They told me my mail is not backed up there unless I create a special folder. I just tried ringing them again but Apple Care is closed today...
Mail is backed up automatically. If you make backups automatically, open Mail application and then, open the Time Machine app (in /Applications/Utilities). You will access to the Time Machine interface, and you will be able to see all your mails of all the backups you have, and you will be able to restore them. It means that your mails are backed up onto the Time Capsule -
Disabled fonts still showing up in programs
I have over 1700 fonts and most of them are disabled through Font Book.
However, all of them still show up in programs like Photoshop and Illustrator.
It's murder having to scroll through the whole list, esp. when most of them shouldn't even be visible.
Am I getting this wrong? What's the point of Disabling a font in Font Book? Why are they still showing up?• Yes, I asked on the Adobe forums as well. No luck there.
• Can't strip down to a nucleus of fonts. I'm a graphic designer and I'm often font matching.
• No, it's not just a Snow Leopard thing. I first noticed this at work and I haven't upgraded there yet.
• I'll tackle the bad fonts next.
Anyway, I finally got it working as it should!
Thing is, i'm not quite sure what I did as I was trying so many things.
If this is happening to you, this is what I did:
1. Search for AdobeFnt.lst files and zap them. (Make sure you don't delete similarly named db files.)
2. Zap everything in the /Library/Cache/... All of it!
3. This "undid" all of my "disabling" in Font Book. Had to do it all over again.
4. Reboot.
And make sure no Adobe apps get opened at all during this process. Not sure about this but I wanted to prevent them from attempting to cache fonts before I was through disabling.
...Whew! -
Trying to install FF 4 beta 2 for Maemo 5 on my N900 but it still shows as 1.1.
Trying to install FF 4 beta 2 for Maemo 5 on my N900 but it still shows as 1.1. Uninstalled, removed all Mozilla repositories, rebooted, sufed back to firefox.com/m/beta and clicked the install link. The N900 switched over to my app manager and re-installed the beta repository then tried to download/install 1.1.
Has the repository been updated for beta 2?There's a problem with the Maemo application manager that causes it to always use the version in the Ovi Store, even if you try to install a newer version from a different source. For a possible solution, see http://talk.maemo.org/showthread.php?t=63508
-
I deleted a contact, but they still show up in my text options to send. I would like to delete the contact from my texts too.
No don't restore your iphone. I've done that several times & it has never worked. -I still have deleted contacts in my iphone texts. *However if you do restore it you will not lose all your data, pics, text messages etc if you backup in iCloud. It restores back to original phone. Very nice :). Anyhowwww....
I JUST figured it out!! :))). Remove the contact from recents.
Start a text. You should see the deleted contact. All the way to the right of the name is a symbol. The symbol is a circle with "i" in the middle. Click that symbol then in red lettering click "remove from recents". -
I have paid for Creative Cloud - illustrator CC 1 year monthly plan, but it still show "Trial Expired". I have tried to sign in and sign out creative cloud many times, but still can't work. Please help!
Does your Cloud subscription show on your account page?
https://www.adobe.com/account.html for subscriptions on your Adobe page
Also,
This is an open forum, not Adobe support... you need Adobe support to help
Adobe contact information - http://helpx.adobe.com/contact.html
-Select your product and what you need help with
-Click on the blue box "Still need help? Contact us" -
I am having trouble removing songs from my iPhone. i have unchecked songs in the library on my mac, but they still show up on phone after syncing. how do I remove them?
Hi asims01,
Welcome to the Support Communities!
The information below may be able to answer your questions about how to delete songs from your iPhone:
Deleting songs downloaded to your device
Tap the Music app.
Tap More > Songs at the bottom.
Scroll or search for the song you would like to delete from your device.
Swipe right to left on the song, and then tap Delete.
Note: You must be in Artists, Songs, or Albums view to delete songs from your device. Deleting from a playlist won't remove a song from your iOS device.
Also, this information can be found on page 64 of the iPhone User Guide for iOS 7
http://manuals.info.apple.com/MANUALS/1000/MA1565/en_US/iphone_user_guide.pdf
Remove a song from iPhone. Tap Songs, swipe the song, then tap Delete. The song is deleted from iPhone, but not from your iTunes library on your Mac or PC, or from iCloud.
If you have iOS 7, this will delete the song from local storage, but the song will still appear with a cloud symbol in the Music app, as you've noticed. To hide the iTunes in the Cloud purchases, navigate to Settings > iTunes & App Store, and disable "Show All: Music”
There may be a few orphaned songs on your iPhone that were partially downloaded or corrupted in some way. If that is the case, you can erase all of the music from your phone. Follow the instructions below and select the Music app under Usage:
iPhone, iPad, and iPod: Understanding capacity
http://support.apple.com/kb/ht1867
I hope this information helps ....
- Judy
Maybe you are looking for
-
Having problem with spinning ball using final cut pro x with new macbook pro with retina screen
Having problem with spinning ball using final cut pro x with new macbook pro with retina screen
-
ITunes playing repeating same song, wont play thru list
I have restored the phone, can't figure out why it will only repeat a song. Started doing this out of the blue. Even does it if I enable shuffle. Stumped
-
How to get JTable's default TAB behavior and apply it to another key ?
Is there any way to get Table's default behavior of one key say TAB & apply it to the another key say ENTER? Means I want to disable JTable's default behavior of ENTER key & I want ENTER key should act like TAB.
-
Hi, i am installing oracle 8i on NT for my production database. I would like to know optimal solution of oracle logical and physical layouts with 6 physical drives. Also, how that ties with fault tolerance i.e. RAID1 RAID5 (which I am thinking of imp
-
Autocomplete Date in a textfield
How can I achieve autocompletion of dates in a textfield. If somebody inserts say 12 the backslash character automatically appears "/". Can somebody helped me out.