Forum Discussion
AB21805
Apr 07, 2022Bronze Contributor
how to remove Lenovo Welcome app via intune
Hi all, I want to remove Lenovo Welcome software on all devices via intune Any ideas on how when I go into HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall I cant seem to find Lenov...
- Apr 07, 2022Create a script that runs the uninstall.ps1, like a uninstall.cmd, with powershell.exe -executionpolicy bypass -file "C:\ProgramData\Lenovo\ImController\Plugins\LenovoFirstRunExperiencePackage\x86)\uninstall.ps1" Add that together with an empty install.cmd in a folder and create a package from that with a detection on the uninstall.ps1 file
AB21805
Apr 08, 2022Bronze Contributor
It seems to of worked! the path was incorrect first time but I am still getting failed message is there away to stop this erroring out?
Apr 08, 2022
Ok... So the uninstall command worked, the application folder and everything is gone now?
- Apr 08, 2022The exit 0 should be on a new line, not on the same line as the uninstall.ps1 command (Perhaphs it's the formatting of the forum, but it needs to be on a seperate line)
Proactive Remidiation will keep on checking, so it will remove it and when a user would install it again it will uninstall it again etc. If you add a PowerShell script to Endpoint Manager.. (https://endpoint.microsoft.com/#blade/Microsoft_Intune_DeviceSettings/DevicesMenu/powershell) It will only run once when it's successfull and never run again. - AB21805Apr 08, 2022Bronze ContributorThey will be all new devices, okay so if I do this as a script:
powershell.exe -executionpolicy bypass -file "C:\ProgramData\Lenovo\ImController\Plugins\LenovoFirstRunExperiencePackage\x86)\uninstall.ps exit 0
Would this stop the error? (have I included the exit 0 correctly)
When it comes to proactive remediation why would this be used instead of scripts? - Apr 08, 2022But won't there be any new Lenovo laptops with the software installed? Do you order them with a clean Windows 10/11 installation or is that no option when ordering?
Otherwise you can create a Proactive Remediation for it if you have Windows 10/11 Enterprise, something like this
Detection
if (test-path "C:\ProgramData\Lenovo\ImController\Plugins\LenovoFirstRunExperiencePackage\x86\uninstall.ps1") {
write-Host Lenovo Welcome found
exit 1
}
Else {
Write-Host No Lenovo welcome found
exit 0
}
Remediation script:
powershell.exe -executionpolicy bypass -file "C:\ProgramData\Lenovo\ImController\Plugins\LenovoFirstRunExperiencePackage\x86\uninstall.ps1 " - AB21805Apr 08, 2022Bronze ContributorI havent tried the extra line though - exit 0
- AB21805Apr 08, 2022Bronze ContributorIt works, but the detection after the installation was successful still doesn't work but what I will do is remove the group from the win32app once its uninstalled the Lenovo software on all devices
- Apr 08, 2022You marked my response as solution, does it work now?
- Apr 08, 2022You have assigned a group to uninstall the application that you created right? Members of that group will start the uninstall.cmd that you made which starts the uninstall.ps1 on the effected computer? If the uninstall.ps1 is no longer there, then the detection should detect that the application is uninstalled.
You could try to modify the uninstall.cmd with an extra line containing EXIT 0 . This way the uninstall routine will always exit with a succes exit code. - AB21805Apr 08, 2022Bronze ContributorYes, thank you but it says failed and the notification on the device when uninstalling states failed too since this fails will this mean it pops up for the user every time it try's to uninstall the app?