Ask Your Question
0

Windows Package remove

asked 2013-10-02 06:36:28 -0500

Quindoo gravatar image

Hello,

I was wondering how I could remove a package on a Windows node. I changed 'installed' into 'absent' or even 'removed', but it gives an Versionable error or it just proceeds without errors but without removal either.

class windows {
        package { '7zip':
                ensure => installed,
                provider => windows,
                source => 'http://downloads.sourceforge.net/sevenzip/7z920-x64.msi'
        }
}

What am I doing wrong?

edit retag flag offensive close merge delete

Comments

Ah, that seemed to be the issue. However, how do you know what the name of the program will be without having it installed manually first? Because I had to ...(more)

Quindoo gravatar imageQuindoo ( 2013-10-03 02:06:18 -0500 )edit

I converted my previous comment to an answer, and as I mention there, you can use the Orca tool to extract the PackageCode from the MSI. The linked page also ...(more)

GregLarkin gravatar imageGregLarkin ( 2013-10-03 11:17:00 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-10-02 12:11:58 -0500

GregLarkin gravatar image

updated 2013-10-03 11:15:14 -0500

Is "7zip" the name of the program that is displayed in the Control Panel Add/Remove Programs dialog? The exact name of the program must be recorded in your package resource in order for uninstallation to work correctly.

The problem is that if you upgrade the program, the package name may change. This will require editing your manifests, or perhaps you can encode the name in a Hiera lookup somewhere. In any case, something will need to change as the package version increases.

There is some additional information here: http://docs.puppetlabs.com/windows/writing.html#packagepackage . That documentation references ... (more)

edit flag offensive delete link more

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: 2013-10-02 06:36:28 -0500

Seen: 124 times

Last updated: Oct 03 '13