windows - Uninstalling Notepad++ with Puppet via Powershell or other means -
with recent advancement version 7.x notepad++, our division has decided push latest x64 version available. however, i'm running problem cannot life of me old version of notepad++ uninstall. initially, simple package manager has worked wonders our previous x32 version of program, move x64, somehow cannot uninstall program.
class notepadpp { require vcredist $version = "7" if($version == "7") { $filename = "${commonfiles::location}\\notepadpp\\${version}\\npp.${version}.installer.x64.exe" } else { $filename = "${commonfiles::location}\\notepadpp\\${version}\\npp.${version}.installer.exe" } if ("${::notepad_uninstall_needed}" == "true"){ exec { 'uninstalling x86 version of notepad++': command => 'powershell -executionpolicy remotesigned -file c:\programdata\puppetlabs\puppet\etc\environments\common\modules\apps\notepadpp\manifests\uninstall.ps1', before => package['notepad++'], } } package { "notepad++": ensure => "${version}", source => $filename, install_options => ['/s', "/no-startup", "/global"] } } i've tried
exec ... command => "c:\program files (x86)\notepad++\uninstall.exe /s" or command => "'c:\program files (x86)\notepad++\uninstall.exe' /s" none of results in proper result. says executed successfully running powershell -file option, never uninstalls application. command returns (err): change notrun 0 failed: no such file or directory - createprocess. .ps1 file looks so:
"c:\<path uninstaller>\uninstall.exe" /s the real problem resides in puppet module. don't want utilize cmd or powershell accomplish task here. aware that may solution problem, not understanding why puppet package not uninstalling program me.
Comments
Post a Comment