Hello,

I managed to make it work with an other strategy :


  $instoracltps1 = 'd:\\resources\\installoraclt.ps1'

  exec { 'install_ora64_client':
      command => "${pwshellbin} -executionpolicy remotesigned -file
${instoracltps1}",
      # (...)
}

The powershell script is :

$env:SEE_MASK_NOZONECHECKS = 1
$args = "-silent -force -noconsole -nowelcome -nowait -responseFile
D:\resources\client.rsp"
Start-Process "P:\oracle_client\winx64_12102_client\client\setup.exe" -wait
-ArgumentList $args | out-null

Installer argument -noconsole -> no new window

Powershell argument -wait -> wait for subprocess

Regards,

Louis Coilliot


2018-06-11 17:38 GMT+02:00 Louis Coilliot <[email protected]>:

> Hello,
>
> I'm trying to install an Oracle client on Windows with the "Oracle
> Universal Installer".
>
> The command works fine manually in a command prompt :
>
> P:\oracle_client\winx64_12102_client\client\setup.exe -silent -nowelcome
> -nowait -responseFile D:\resources\client.rsp
>
> or
>
> C:\Windows\System32 /c "P:\oracle_client\winx64_12102_client\client\setup.exe
> -silent -nowelcome -nowait -responseFile D:\resources\client.rsp"
>
> In the command window it launches a new install window and gives back the
> command prompt immediately.  In the new window, the install is fine and in
> the end the window is closing automatically.
>
> Note that it gives back the prompt immediately and that the installer runs
> in another window.
>
> Doing this in an exec resource with puppet, it gets stuck
>
> - the installer window is launched
> - the installation process is OK
> - the installer window is closed automatically
> - the puppet agent gets stuck
>
> Then I need to kill the command window with the puppet agent run to kill
> the puppet run.
>
> When I do that, the Oracle client is installed and working. A new run
> won't try to install it again.
>
> And the software is present in the installed software list.
>
> Here is the code :
>
>   $winpath = "C:\\Windows\\System32"
>
>   $orainstcmd = [
>     #"${winpath}\\cmd.exe /c",
>     #"\"",
>     "P:\\oracle_client\\winx64_12102_client\\client\\setup.exe",
>     '-silent',
>     '-nowelcome',
>     '-nowait',
>     "-responseFile D:\\resources\\client.rsp",
>     #"\"",
>   ]
>
>   $orainstcmdstr = join($orainstcmd, ' ')
>
>   $tstcommand = "${winpath}\\cmd.exe /c \"if exist D:\\Oracle\\sqlplus.exe
> (exit 0) else (exit 1)\""
>
>   exec { 'install_ora64_client':
>       command => $orainstcmdstr,
>       require => [
>         Exec['Map resource drive'],
>         File['d:\\resources\client.rsp'],
>       ],
>       unless  => $tstcommand,
>       timeout => 240,
>   }
>
> The timeout is not helping.
>
> -silent: Runs Oracle Universal Installer in silent mode and suppresses
> the Welcome window.
>
> -nowait: Closes the console window when the silent installation completes.
>
> Any hints ?
>
> Thanks in advance.
>
> Regards,
>
> Louis Coilliot
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAE9jN32YHhdPi3m%3D3Ro5t38eAte3siMOty2mKUm2pxCo5XhAGg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to