Hi,
The following code execution results are different from those in Powershell ISE. I have encountered similar situations before. Are there any good solutions?
Thank you in advance for any suggestions and help
David
powershell ise result:
TIM was found at C:\Program Files\LibreAutomate
TIM was not found at C:\Program Files (x86)\LibreAutomate
PsCmd2 result:
TIM was not found at C:\Program Files (x86)\LibreAutomate
TIM was not found at C:\Program Files (x86)\LibreAutomate
Macro Macro10
The following code execution results are different from those in Powershell ISE. I have encountered similar situations before. Are there any good solutions?
Thank you in advance for any suggestions and help
David
powershell ise result:
TIM was found at C:\Program Files\LibreAutomate
TIM was not found at C:\Program Files (x86)\LibreAutomate
PsCmd2 result:
TIM was not found at C:\Program Files (x86)\LibreAutomate
TIM was not found at C:\Program Files (x86)\LibreAutomate
Macro Macro10
_s=
;$programFiles = [Environment]::GetFolderPath("ProgramFiles")
;$programFilesx86 = [Environment]::GetFolderPath("ProgramFilesX86")
;
;$searchPaths = @("$programFiles\LibreAutomate", "$programFilesx86\LibreAutomate")
;
;foreach ($searchPath in $searchPaths)
;{
;,if (Test-Path "$searchPath\Au.Editor.exe")
;,{
;,,write-output "TIM was found at $searchPath"
;,}
;,else
;,{
;,,write-output "TIM was not found at $searchPath"
;,}
;}
PsCmd2 _s "" _s
out _s