exec { 'Lenovo System Update':
command => '"C:\Program Files (x86)\Lenovo\System Update\tvsu.exe" /CM',
onlyif => 'if exist "C:\Program Files (x86)\Lenovo\System Update\tvsu.exe" exit 0 else exit 1',
timeout => 10800,
}
The problem is apparently that onlyif is failing to exit 1 (i.e. not try and run the command) when the exe doesn't exist. This is testing on Windows 7.
My googling implies the above should work - so before I try something totally different, is it the puppet wrapper that's having an issue? How does everyone else handle spaces in filenames likr this?