BlockExecution silently?

Topics: Archive - General
Mar 11, 2015 at 12:13 PM
Edited Mar 11, 2015 at 12:14 PM
Im new to this tool and I have to say I love it. Makes deployment so much easier.

Is there a way to block executions silently?
Im currently using this tool for a Java deployment and we have a Printing solution that is constantly trying to restart javaw.exe so the users will in some cases get promted with about 5-10 windows from the BlockExecution function during install. A bit annoying and it will make our users confused and start calling our helpdesk, so in this case I would like to do it silently.
Is it possible?
I have searched but cant find anything.
Mar 12, 2015 at 10:55 AM
You can simply call the Block-AppExecution function directly to silently block the application.
Mar 12, 2015 at 2:43 PM
Call it directly? Care to elaborate on that?
Mar 12, 2015 at 2:59 PM
Normally you block applications by specifying them when using the welcome prompt function. The welcome prompt function basically calls Block-AppExecution to do the blocking. If you don't want the prompt, then just call Block-AppExecution and don't use the prompt to do the blocking. The function has an example which shows how to use it.
Mar 16, 2015 at 9:00 PM
Create blank empty vbs "AppDeployToolkit_BlockAppExecutionMessage_Blank.vbs" and store it on AppDeployToolkit folder
Create new Function on AppDeployToolkitExtensions.ps1
Function HiddeBlockMessage {
    Hide Block message
    Modify registry key pointing to blank vbs script
    Param (
    Begin {
        ## Get the name of this function and write header
        [string]${CmdletName} = $PSCmdlet.MyInvocation.MyCommand.Name
        Write-FunctionHeaderOrFooter -CmdletName ${CmdletName} -CmdletBoundParameters $PSBoundParameters -Header
    Process {
        Try {
                [string]$regKeyAppEx= 'HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options'
                [psobject[]]$unblockPName = Get-ChildItem -Path $regKeyAppEx -Recurse -ErrorAction 'SilentlyContinue' | ForEach-Object { Get-ItemProperty -LiteralPath $_.PSPath } | Where-Object { $_.Debugger -like '*AppDeployToolkit_BlockAppExecutionMessage*' }
                ForEach ($unblockP in $unblockPName) 
                $unblockP | Set-ItemProperty -Name Debugger -Value 'wscript.exe "C:\Users\Public\aG Deployment Kit\AppDeployToolkit_BlockAppExecutionMessage_Blank.vbs"'
        Catch {
            Write-Log -Message "<error message>. `n$(Resolve-Error)" -Severity 3 -Source ${CmdletName}
    End {
        Write-FunctionHeaderOrFooter -CmdletName ${CmdletName} -Footer
Call function HiddeBlockMessage on Deploy-Application.ps1 After InstallationWelcome
Show-InstallationWelcome -CloseApps ......
Mar 19, 2015 at 5:48 PM
I have tried using Block-AppExecution -ProcessName 'javaw,iexplore,chrome,firefox,safari' after Show-InstallationWelcome, no luck, I get the Close App promt.
I have also tried using it in pre installation task but it doesnt work at all, no block.