Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When I am writing any PowerShell script, I am hard coding the following paths to perform some operation

C#
Start-Process -FilePath "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe" -ArgumentList $parameters -Wait


C#
C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\Microsoft.AnalysisServices.Deployment.exe


Instead I would like to get the latest version installed and its relative path this can be C:\Program Files (x86) either C:\Program Files or the other path based on PC configuration. So is there any dynamic way to get the required software latest version

What I have tried:

I tried to get it from registry but I couldn't
Posted

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