Command Line Mode Using Powershell

Feel free to ask any question here
Post Reply
cmackSIO
Posts: 12
Joined: Fri Jun 24, 2022 10:32 pm

Command Line Mode Using Powershell

Post 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
Attachments
Screenshot 2022-07-01 154220.png
Screenshot 2022-07-01 154220.png (166.24 KiB) Viewed 3247 times
Jälv
Posts: 28
Joined: Sun Jul 02, 2017 8:35 pm

Re: Command Line Mode Using Powershell

Post 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
cmackSIO
Posts: 12
Joined: Fri Jun 24, 2022 10:32 pm

Re: Command Line Mode Using Powershell

Post 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!
Post Reply