Ask Your Question
1

Package Install_Options that require a space and double quotes

asked 2015-04-30 22:02:13 -0500

AlexLaverty gravatar image

Hi Guys,

I'm trying to convert this command to a puppet script :

msiexec /i "Octopus.2.6.2.845-x64.msi" /qb /l "Octopus.2.6.2.845-x64.msi.log" INSTALLLOCATION="E:\Octopus Deploy\Octopus\Install"

So far I can run this puppet script successfully without a space in the path (E:\OctopusDeploy\Octopus\Install), this works :

package { 'Octopus': ensure => '2.6.2.845', source => 'C:\Vagrant\Octopus.2.6.2.845-x64.msi', install_options => ['/qb','/l' => 'C:\Vagrant\Octopus.log','INSTALLLOCATION=E:\OctopusDeploy\Octopus\Install'], }

but I need it to have a space in the filepath (E:\Octopus Deploy\Octopus\Install) :

I've tried different combinations of quotes, double quotes, escape slashes etc but I can't get anything to work with this path :

E:\Octopus Deploy\Octopus\Install

Have tried the following combinations :

package { 'Octopus': ensure => '2.6.2.845', source => 'C:\Vagrant\Octopus.2.6.2.845-x64.msi', install_options => ['/qb','/l' => 'C:\Vagrant\Octopus.log','INSTALLLOCATION="E:\Octopus Deploy\Octopus\Install"'], }

package { 'Octopus': ensure => '2.6.2.845', source => 'C:\Vagrant\Octopus.2.6.2.845-x64.msi', install_options => ['/qb','/l' => 'C:\Vagrant\Octopus.log','INSTALLLOCATION='E:\Octopus Deploy\Octopus\Install''], }

package { 'Octopus': ensure => '2.6.2.845', source => 'C:\Vagrant\Octopus.2.6.2.845-x64.msi', install_options => ['/qb','/l' => 'C:\Vagrant\Octopus.log','INSTALLLOCATION','=','"E:\Octopus Deploy\Octopus\Install"'], }

package { 'Octopus': ensure => '2.6.2.845', source => 'C:\Vagrant\Octopus.2.6.2.845-x64.msi', install_options => ['/qb','/l' => 'C:\Vagrant\Octopus.log',"INSTALLLOCATION=\"E:\Octopus Deploy\Octopus\Install\""], }

can't seem to get anything to work, any help would be greatly appreciated.

Regards Alex

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2015-05-01 07:37:46 -0500

rnelson0 gravatar image

I don't use Puppet to install packages on windows, but the latest documentation and type reference suggest that the install options should use an array that contains hashes. Perhaps something like this would work:

package { 'Octopus':
  ensure => '2.6.2.845',
  source => 'C:\Vagrant\Octopus.2.6.2.845-x64.msi',
  install_options => [
    '/qb',
    { '/l' => 'C:\Vagrant\Octopus.log' },
    { 'INSTALLLOCATION' => 'E:\Octopus Deploy\Octopus\Install' },
  ],
}
edit flag offensive delete link more

Comments

Ah yes thank you very much that worked, I did read the documentation about using the hashes but I wasn't sure what it meant. Thanks again

AlexLaverty gravatar imageAlexLaverty ( 2015-05-05 01:53:08 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-04-30 22:02:13 -0500

Seen: 1,733 times

Last updated: May 01 '15