9

I need to trigger a particular GPO-deployed application to reinstall. In the past I've just deleted a certain registry key that tells Windows: "this application has been installed".

But I can't for the life of me remember where those keys are located in the registry, and searching isn't turning much up.

Thanks!

4 Answers 4

9

Look in:

HKLM\Software\Microsoft\Windows\Current Version\Group Policy\AppMgmt. Find the key that corresponds to the software you're looking for, and delete it. Then run gpupdate /force and restart.

2

I believe:

GPO applied to the local computer:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Group Policy\History

GPO applied to the currently logged on user:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion
  \Group Policy\History
3
  • That's not quite it. When an application is installed automatically through group policy, a registry key is created somewhere (which is what I'm looking for). If you uninstall the application, this registry key will not be removed, and the software will not automatically be installed on the next boot. Running gpupdate /force often works, but sometimes deleting the registry key is necessary to force installation.
    – Boden
    Feb 11, 2010 at 18:43
  • 1
    You were close, the keys are under HKLM\Software\Microsoft\Windows\CurrentVersion\Group Policy\AppMgmt
    – Boden
    Feb 11, 2010 at 18:50
  • ah, you are right. Glad I got you almost there.
    – Fergus
    Dec 25, 2010 at 22:08
2

Instead of deleting the key, you can also set the AppState value to 0. The original value should 9 or 17 (with removal option).

Get-ItemProperty `
-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\AppMgmt\*" `
| ForEach-Object {
  if ($_. "Deployment Name" -match '^<the deployment name>$') {
    $_

    $answer = Read-Host "Set value?"

    if ( $answer -match "(?i)Y") {
      New-ItemProperty $_.PSPath -Name AppState -Value 0 -Force
    }
  }
}

PS: I wanted to add a comment to the accepted answer but I do not have 50 reputations as of now, so I am adding an answer here.

1

Not a direct answer, but if you go into the GPO and right click the Application object go to All Tasks -> Redeploy. That will well redeploy the application.

1
  • 2
    One caveat is that it will redeploy to all users in the GPO scope, so make sure that's what you really want to happen before doing it! Feb 11, 2010 at 19:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .