# Get the Installed Path for a program on Win Svr

**URL:** <https://forums.powershell.org/t/get-the-installed-path-for-a-program-on-win-svr/9878>\
**Category:** PowerShell Help\
**Created:** [December 19, 2017, 4:30am UTC](https://forums.powershell.org/t/get-the-installed-path-for-a-program-on-win-svr/9878 "2017-12-19T04:30:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![clive](https://avatars.discourse-cdn.com/v4/letter/c/f08c70/32.png) [@clive](https://forums.powershell.org/u/clive)\
**Post date:** [December 19, 2017, 4:30am UTC](https://forums.powershell.org/t/get-the-installed-path-for-a-program-on-win-svr/9878/1 "2017-12-19T04:30:34Z")

</div>

I’ve been testing out various solutions using Powershell to list installed program information, which is fine more most information such as version info, etc but the key piece of info I’m looking for is the InstalledLocation/InstalledDir. It seems that in most cases, this particular property is simply not available for most programs. Given a program name (displayname), can someone suggest a way to reliably/efficiently get a program’s installation directory/path (remote to other servers)?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![simbrook](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@simbrook](https://forums.powershell.org/u/simbrook)\
**Post date:** [December 19, 2017, 4:43am UTC](https://forums.powershell.org/t/get-the-installed-path-for-a-program-on-win-svr/9878/2 "2017-12-19T04:43:01Z")

</div>

Have a look at June Blenders post here

> **[How to find an installation directory - SAPIEN Information Center | SAPIEN...](https://info.sapien.com/index.php/scripting/scripting-how-tos/how-to-find-installation-directory)**
>
> One of the important best-practice rules in scripting (and programming) is to avoid using constant values for things that can vary. Using constants or 'hard-coding' variable values is prone to error a

---

<div class="post-metadata">

**Author:** ![clive](https://avatars.discourse-cdn.com/v4/letter/c/f08c70/32.png) [@clive](https://forums.powershell.org/u/clive)\
**Post date:** [December 19, 2017, 5:24am UTC](https://forums.powershell.org/t/get-the-installed-path-for-a-program-on-win-svr/9878/3 "2017-12-19T05:24:01Z")

</div>

Thank you Simon. Under the covers, that solution still uses Get-ChildItem, which is what I’ve been using. The problem is that many of the third-party installers don’t set the InstallPath property. So, nice procedure but doesn’t fix my issue.

---

<div class="post-metadata">

**Author:** ![simbrook](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@simbrook](https://forums.powershell.org/u/simbrook)\
**Post date:** [December 19, 2017, 5:32am UTC](https://forums.powershell.org/t/get-the-installed-path-for-a-program-on-win-svr/9878/4 "2017-12-19T05:32:05Z")

</div>

maybe a combo of a wmi query and a registry query needed.

---

<div class="post-metadata">

**Author:** ![simbrook](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@simbrook](https://forums.powershell.org/u/simbrook)\
**Post date:** [December 19, 2017, 6:52am UTC](https://forums.powershell.org/t/get-the-installed-path-for-a-program-on-win-svr/9878/5 "2017-12-19T06:52:32Z")

</div>

Not used it but this looks interesting a installer module for powershell

[https://psmsi.codeplex.com/](https://psmsi.codeplex.com/)

---

<div class="post-metadata">

**Author:** ![postanote](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@postanote](https://forums.powershell.org/u/postanote)\
**Post date:** [December 19, 2017, 3:18pm UTC](https://forums.powershell.org/t/get-the-installed-path-for-a-program-on-win-svr/9878/6 "2017-12-19T15:18:17Z")

</div>

I have a few ITIL level questions (as these lead to a lot of places to look):

1 - Are you saying, these 3rdP installers do not even register themselves in the Add Remove Programs and do not provide an uninstall path? If so, then, how would you uninstall them?  
2 - Do you have a ITIL/CMDB SOP, that list the allowed to be installed applications, aka whitelist?  
3 - How do these apps get distributed / installed?  
4 - Do, you have a ITIL/CMDB SOP, the scan’s and records the systems environment variables and subdirs of those?  
ProgramData C:\ProgramData  
ProgramFiles C:\Program Files  
ProgramFiles(x86) C:\Program Files (x86)  
ProgramW6432 C:\Program Files  
5 - Do, you have a ITIL/CMDB SOP, the scan’s the systems registry for all uninstall strings?  
6 - What about AV scan polices, does your ITIL/CMDB policy define scan locations? (I ask this, because if the AV is scanning, then it should have a log of what it scanned and the result of that scan.)

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:37pm UTC](https://forums.powershell.org/t/get-the-installed-path-for-a-program-on-win-svr/9878/7 "2024-05-16T20:37:01Z")

</div>


