Page 1 of 1

Command Line Mode Using Powershell

Posted: Fri Jul 01, 2022 10:54 pm
by cmackSIO
Hi everyone,
I'm attempting to write scripts in the powershell ise to automate some CC functions and I'm running into some difficulties. I was able to open clouds using the command line, but when I try to run any CloudCompare functions in powershell I am getting errors. Has anyone had issues with this or been able to run command line through powershell successfully? I've tried it from the cloudcompare directory itself and from the c drive using the longer path and neither method is working though both ways works using cmd terminal (screenshot attached). Any advice would be appreciated I'd much rather use PS if possible, thank you!
Cheers,
CM

Re: Command Line Mode Using Powershell

Posted: Sat Jul 02, 2022 9:55 am
by Jälv
To start a process like that in PowerShell you have to add a `&` at the beginning.

Code: Select all

&"C:\Program Files\CloudCompare\CloudCompare.exe" -o $path
Or you can use Start-Process

Code: Select all

Start-Process -Wait "C:\Program Files\CloudCompare\CloudCompare.exe" -ArgumentList '-o',$path

Re: Command Line Mode Using Powershell

Posted: Fri Jul 08, 2022 8:45 pm
by cmackSIO
Great thank you, I've been able to get this working, apologies for the rookie questions, I'm learning powershell as I go along with this project - I appreciate your help!