Installing an exe like VLC

19 views
Skip to first unread message

Jarod Schoen

unread,
Nov 10, 2020, 6:31:18 PM11/10/20
to Puppet Users
Hi
so I just got started and I'm glad to be joining you.

I have a question to get me started on my journey.

Without escalating I get:
Error: Could not update: The requested operation requires elevation. - CreateProcess

So it looks like I have to run puppet with LocalService or some admin account. That's fine. I'll have to sort that out later.

The major issue is with running exes.

Here's my pp:

package { 'vlc':
  ensure          => '3.0.1',
  source          => 'somepath\vlc-3.0.1-win64.exe',
#  install_options => ['INSTALLDIR=C:\blabla'],
}

When I run the Start Command Prompt as admin, it runs... but then VLC asks me for input which completely defeats the purpose of puppet in the environment.


Do you guys know how to get puppet to take care of these installs or would I have to find an msi for everything... that already has built-in 'silent' and other install config switches ?





Ben Ford

unread,
Nov 10, 2020, 6:33:31 PM11/10/20
to puppet...@googlegroups.com
Welcome!

I'd actually install Chocolatey and use the provider from https://forge.puppet.com/modules/puppetlabs/chocolatey to manage packages like this on Windows.

--
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 puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/fb546cff-2acf-4810-8fdf-58c39ef7ce67n%40googlegroups.com.

Jarod Schoen

unread,
Nov 12, 2020, 10:08:28 AM11/12/20
to Puppet Users
I see I guess that could work. So Chocolatey could be directed by puppet to install things.
Do you know how well an offline Chocolatey repo works?

When people use puppet to keep things installed and roll updates/new versions... do people invariably have to revert to manual install for some applications?

KevinR

unread,
Nov 13, 2020, 6:53:00 AM11/13/20
to Puppet Users
Hi Jarod,

the following Puppet code will do what you want to achieve:

$file = 'vlc-3.0.11-win32.exe'
$tmpdir = 'C:/Windows/Temp'

file { 'VLC Player Download':
    ensure => present,
    path => "${$tmpdir}/${file}",
}

package { 'VLC media player':
    ensure => 'present',
    source => "${$tmpdir}/${file}",
    install_options => ['/L=1033', '/S']
}

It's all about finding the silent install switches for these packages. For VLC, you can find that in the "Alternative" section here: https://wiki.videolan.org/Documentation:Installing_VLC/ 

KevinR

unread,
Nov 13, 2020, 6:59:42 AM11/13/20
to Puppet Users
Also note the name of the package resource being "VLC media player". You need to make sure this matches (case-sensitive) the name of the application in Add/Remove Programs after installation.
That's how Puppet recognizes the app has been installed, so it won't try to reinstall it on the next Puppet run.

You can run the following command to output how Puppet detects this application after installation:
puppet resource package 'VLC media player'

Reply all
Reply to author
Forward
0 new messages