# Package install_options cant handle empty string

My puppet code installs an msi with multiple install options that are inserted into a config file.

package {'installer':
ensure          => installed,
source          => "${install_tmp_path}/${installer_exe}",
install_options => [
'/qn',
{'SMTP_HOST' => $smtp_host}, {'SMTP_USER' =>$smtp_user},
{'SMTP_PORT' => $smtp_port}, {'SMTP_PASSWORD' =>$smtp_password},
{'SMTP_SSL' => $smtp_ssl}, {'SMTP_FROM_ADDRESS' =>$smtp_from_address},
],
require         => File['test']
}


However if any of these values is an empty string (such as the user or password) then instead of passing in an empty string the next argument is picked up as the value. So for instance instead of:

<add key="SMTPUser" value=""/>


We get:

<add key="SMTPUser" value="SMTP_PORT=25"/>


(The * for port is the default value for the msi if SMTP_Port isnt defined).

What I believe is happening is that when Package translates the code into a command line argument it doesn't wrap the empty string in quotation marks, so it translates to this:

SMTP_USER= SMTP_PORT=25


Meaning that cmd determines that the next option is actually the value for SMTP_USER. Instead what it needs to do is this:

SMTP_USER='' SMTP_PORT=25


Has anyone else seen this problem? Is there a workaround to this? I've tried forcing in quotation marks like so:

{'SMTP_USER' => '\'\''},


However it ends up with double quotation marks: