Burgs Posted February 15, 2019 Posted February 15, 2019 Greetings, I have a fairly straightforward question. Is there a way to write script that would search for and determine the location of an installed program on any particular client machine? For example if I wanted to determine the location of a Gstreamer program installation on a client machine (for example if it is located in C:/Gstreamer directory where it normally would be...or not) is there some code snippet or command that would accomplish that? I thank you in advance. Regards.
ScottW Posted February 15, 2019 Posted February 15, 2019 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\notepad++.exe Can you read the registry and pull the path from there? $FileLocation=RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\notepad++.exe", "Default")
Earthshine Posted February 15, 2019 Posted February 15, 2019 (edited) 64 bit installed packages HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall 32 bit installed packages HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall Each entry has an InstallLocation associated with it. I use that on repairs of our products to know where to put the missing files during an installer repair operation. Edited February 15, 2019 by Earthshine My resources are limited. You must ask the right questions
ScottW Posted February 15, 2019 Posted February 15, 2019 Nice to know. I just did a quick registry search so your path is probably better
Earthshine Posted February 15, 2019 Posted February 15, 2019 they both have their uses. for looking up where an app is, the app path is better/quicker My resources are limited. You must ask the right questions
Burgs Posted February 16, 2019 Author Posted February 16, 2019 Thank you for the replies. I thought of checking the registry before, however was unsure if that would be 'fail proof'...not sure if all software installations display in the registry. I suppose I could supplement that with a search using "FileListToArray" in case of failure to locate in the registry as a workable solution...thanks again to each of you!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now