Issue in Getting User Environment Path

HI Team,

strucked with 2 issues:

  1. getting following Error when i am trying to get putty.exe file path

  1. and when i tried for NOTEPAD, the following is the result

but i am not expecting result as “System.Collections.ObjectModel.Collection`1[System.Management.Automation.PSObject]” — i am expecting the path of exe file

@devasaiprasad_K

@devasaiprasad_K

Hello,

Please try with whole path and check the name of .exe is right
for example: in command
“C:\Program Files\mtputty\mtputty.exe”

@devasaiprasad_K
if you want dynamically then too we have the option.

Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)+"/myttpo/(Foldername)"+"myttpo.exe"