I am haveing an issue running this script. The script runs great as it goes through my folders and registers the apps based on the permitted group setting. When I remove the user from the permitted group and run the script again the program is removed but the application is still listed in the Program and Features.
How can ensure that the program is removed from the list in Program and Features when its no longer registered?