April 19, 2020 at 8:19 am #220425ParticipantTopics: 6Replies: 5Points: 82Rank: Member
I have one software which consists of several applications which need to be installed on Windows. Its installation is within the C:/Program Files/ApplicationName/…….
Some of those applications are run as service – some are not, for some of them exist configuration within the Registry but for some of them not. Is there maybe some native function, operation, method in PowerShell that can check somehow if specific application is installed on Windows or not? Or how to achieve this? What will be the best way?
The main purpose is that because I run 2 scripts using the PowerShell for those applications: installation and upgrade occasionally. If application does not exist then run installation script with all required parameters, if it exists then run Upgrade script with different arguments.
Thanks in advance!!!
April 19, 2020 at 8:47 am #220431ParticipantTopics: 4Replies: 2231Points: 5,414Rank: Community MVP
Did you at least try to search for it? Something like this has been asked a thousand times even here on Powershell.org and you will find more than enough when you use your favorite search engine. There is no magical single cmdlet you can run. If you have a specific application not registering properly in Windows you’ll need to figure out how to determine if it’s properly installed or not.
April 19, 2020 at 12:53 pm #220452ParticipantTopics: 6Replies: 5Points: 82Rank: Member
I found this article which describes process.
Is this the preferred way?
I need to write PowerShell script to achieve this but, as I mentioned I am struggling to find common way for all cases. That is why I asked if maybe PowerShell has native, and some out-of-the box command which can be used that covers applications that are registered as services, in registries and which are not in both of these.
April 19, 2020 at 1:33 pm #220455ParticipantTopics: 4Replies: 2231Points: 5,414Rank: Community MVP
… I am struggling to find common way for all cases.
That just does not exist. You have to figure that out for the particular software you are dealing with. If it’s a service you have to check this particular service. If it’s a copied executable you have to chekc this particular exe at the place where it belongs. There is no magic involved. It’s pure and simple hard work … for you. 😉
April 19, 2020 at 2:47 pm #220470ParticipantTopics: 29Replies: 809Points: 2,428Rank: Community Hero
- You must be logged in to reply to this topic.