[wix-users] How to Run a cmdline which contains spaces

Joseph L. Casale jcasale at activenetwerx.com
Tue Oct 3 04:26:29 PDT 2017

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf
Of Tom Ofek Kafka via wix-users
Sent: Tuesday, October 3, 2017 4:42 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Tom Ofek Kafka <tom.k at walkme.com>
Subject: [wix-users] How to Run a cmdline which contains spaces

> I am trying to run a cmd line which contains spaces. for example: "ping
> localhost". When I configure it in the wxs file the installation fails. But
> when using a command with no spaces (for example: "ipconfig") everything
> works properly.
> Here is the relevant part in the wxs file (changing the ipconfig to ping
> localhost or any other command with two or more words will cause failure)
> <Property Id="MyProcess.MyTask" Value=""ipconfig""/>
> <CustomAction Id="MyProcess.TaskKill" Return="check" Impersonate="no"
> Execute="deferred" DllEntry="CAQuietExec" BinaryKey="WixCA"/>
> <InstallExecuteSequence>
>       <Custom Action="MyProcess.MyTask" After="InstallInitialize"/>
> </InstallExecuteSequence>

You need to correctly quote and escape...

For example, https://stackoverflow.com/a/6898398/3536370

More information about the wix-users mailing list