Re: [Interest] Executing PowerShell command with quotes using QProcess

2014-04-03 Thread Damian Ivanov
I'm sorry if this may not help but I wanted to share as it's somewhat related. On Windows systems one can from QProccess access any Windows cmd command. The process should be defined as cmd /c $mycommand /k maybe also useful. 2014-04-03 2:34 GMT+02:00 Sze Howe Koh szehowe@gmail.com: On 3

Re: [Interest] Executing PowerShell command with quotes using QProcess

2014-04-03 Thread Joerg Bornemann
On 03-Apr-14 02:34, Sze Howe Koh wrote: Nor on Windows's prompt: C:\echo hello hello Checking arguments with the echo shell built-in on Windows is not a good idea. It behaves (not even) slightly different from real executables. Create an executable that prints its arguments and you will

Re: [Interest] Executing PowerShell command with quotes using QProcess

2014-04-03 Thread Damian Ivanov
one could use cmd /c echo hello at least I do so, or this somehow bad? 2014-04-03 12:36 GMT+03:00 Joerg Bornemann joerg.bornem...@digia.com: On 03-Apr-14 02:34, Sze Howe Koh wrote: Nor on Windows's prompt: C:\echo hello hello Checking arguments with the echo shell built-in on Windows is

Re: [Interest] Executing PowerShell command with quotes using QProcess

2014-04-03 Thread Joerg Bornemann
On 03-Apr-14 12:28, Damian Ivanov wrote: one could use cmd /c echo hello at least I do so, or this somehow bad? You can use that if you're completely sure that echo prints its arguments verbatim. I for one wouldn't be surprised if there's some weird edge case where it transforms the passed

Re: [Interest] Executing PowerShell command with quotes using QProcess

2014-04-02 Thread Thiago Macieira
Em qua 02 abr 2014, às 12:18:59, Jason Kretzer escreveu: powershellHDD.start(PowerShell -Command \{(Get-WmiObject Win32_LogicalDisk -Filter \\\DeviceID='C:’\\\).Size}\); This does not work as I expect it to. The dataHDDsize is an empty string “”. If I pull the command out and run it

Re: [Interest] Executing PowerShell command with quotes using QProcess

2014-04-02 Thread Jason Kretzer
-project.org Subject: Re: [Interest] Executing PowerShell command with quotes using QProcess Em qua 02 abr 2014, às 12:18:59, Jason Kretzer escreveu: powershellHDD.start(PowerShell -Command \{(Get-WmiObject Win32_LogicalDisk -Filter \\\DeviceID='C:’\\\).Size}\); This does not work as I expect

Re: [Interest] Executing PowerShell command with quotes using QProcess

2014-04-02 Thread Sze Howe Koh
On 3 April 2014 06:23, Thiago Macieira thiago.macie...@intel.com wrote: Em qua 02 abr 2014, às 12:18:59, Jason Kretzer escreveu: powershellHDD.start(PowerShell -Command \{(Get-WmiObject Win32_LogicalDisk -Filter \\\DeviceID='C:'\\\).Size}\); This does not work as I expect it to. The