Ask Your Question

Windows Package remove

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

Quindoo gravatar image


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 => ''

What am I doing wrong?

edit retag flag offensive close merge delete


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 -0600 )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 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

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

GregLarkin gravatar image

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

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: . 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


Asked: 2013-10-02 06:36:28 -0600

Seen: 146 times

Last updated: Oct 03 '13