That key should automatically be removed after the program is installed.

If you wanted to put a check in, I would put it above the
Show-InstallationPrompt.
I would also use the built in functions to look for the registry key and
remove it if it exists.
It's covered in the documentation: Get-RegistryKey, Remove-RegistyKey.

On Tue Feb 17 2015 at 4:01:23 PM Murray, Mike <[email protected]> wrote:

>  We’re deploying the latest Java release using the toolkit, but a few
> users have had a problem launching IE after it installs. This article
> explains:
>
>
>
> http://psappdeploytoolkit.codeplex.com/discussions/554051
>
>
>
> In our case, the registry key causing the issue is located in 
> *HKLM\SOFTWARE\Microsoft\Windows
> NT\CurrentVersion\Image File Execution Options\iexplore.exe*. The
> Debugger key reads:
>
>
>
> *“wscript.exe
> "C:\Users\Public\PSAppDeployToolkit\AppDeployToolkit_BlockAppExecutionMessage.vbs"*
>
>
>
> Someone in the comments recommended some PowerShell code that could remove
> the registry entry that is causing the issue. I am looking to add this to
> the post-installation section of *Deploy-Application.ps1*. Can someone
> take a look at the code below and confirm this should do the trick?  Thanks!
>
>
>
>
> ##*===============================================
>
>                                 ##* POST-INSTALLATION
>
>
> ##*===============================================
>
>                                 [string]$installPhase = 'Post-Installation'
>
>
>
>                                 ## <Perform Post-Installation tasks here>
>
>
>
>                                 ## Display a message at the end of the
> install
>
>
>
>                                 Show-InstallationPrompt -Message
> 'Installation complete.' -ButtonRightText 'OK' -Icon Information -NoWait
>
>
>
>                                 ## Clean up IE registry key
>
>                                 Get-ChildItem
> "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution
> Options" -Recurse |
>
>                                 ForEach-Object { Get-ItemProperty
> $_.pspath } |
>
>                                 Where-Object {$_.Debugger -like
> "*PSAppDeployToolkit*"} |
>
>                                 Remove-ItemProperty -Name Debugger
>
>
>
>
>
> Best Regards,
>
>
>
> Mike Murray
>
> Desktop Management Coordinator - IT Support Services
>
> California State University, Chico
>
> 530.898.4357
> [email protected]
>
>
>
>



Reply via email to