Click here to Skip to main content
15,895,962 members
Please Sign up or sign in to vote.
1.44/5 (2 votes)
I'm working on a simple C# Application, where I've to get the number of system installed apps. Not the applications installed by the user.
After some working on this, I came to know we can get information of system resources using Registry Class but I don't know how can I use this class to get my desired info.

What I have tried:

I tried to find it but everyone is talking about the application installed by the user.
like here and here.
Posted
Updated 25-Jun-18 5:45am
v2
Comments
G3Coder 25-Jun-18 10:08am    
Could you please explain which system installed apps you are looking for?
Ammar Shaukat 25-Jun-18 10:10am    
Applications that installed by default in windows. like few UWP apps that comes with windows by default. and I'll prefer to use UWP APIs for this.

1 solution

The actual question here is, how to tell that an app is installed by user or System (including the IT department, etc. etc.). To use the Registry and find all the apps installed you have already checked this SO thread. But again, what is the purpose of using .NET Core for a task that can be done easily by UWP runtime — PackageManager[^] object in Windows Runtime? This API makes it super easy to check who installed the app, from the Remarks section at, PackageUserInformation[^],
Quote:
To enumerate the users who have installed a package, use the PackageManager.FindUsers[^] method.
And you can then check who installed it.

If you still want to use .NET Core, then you might want to use a workaround, one way to tell who installed the app is to check the Windows logs and events to see what happened and with whose account. Last approach will be — might be — to check the executable files for each of the app installed, and see who created the app and this requires that you enable auditing of the files, please check this Windows Server related thread; 4.18. Finding Who Last Opened or Modified a File - Windows Server Cookbook [Book][^]

Still I am unaware of any way that you can tell natively and without any modifications to the system, who did what.
 
Share this answer
 
v2
Comments
Ammar Shaukat 26-Jun-18 1:35am    
thanks for the help. Actually, I don't want to check who installed the app. I just want to get a count of default system apps.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900