![]() ![]() Thanks to Liviuįor example, this command uses the Win32_Product class to get the installation directory of my current copy of PowerShell Studio 2016. The installers, potentially changing installer settings: Why-win32_product-is-bad-news. NOTE: Darren Mar-Elia ( warns not to use Win32_Product because accessing it updates You need to include the program name, but you can take it from a parameter and use wildcards to hedge your bet. The Win32_Product class returns an object that contains the path to the installation directory for a program. I used the new performance monitoring report graph in PowerShell Studio and PrimalScript to test them. How do you find the path to a Windows program dynamically at run time? There are a few different techniques, but they really perform differently. Reliable techniques for finding the installation directory Place the path variable at the top of a script (in script scope), so it's very obvious to anyone who is maintaining the script. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |