Quantcast
Channel: PowerShell App Deployment Toolkit
Viewing all 2341 articles
Browse latest View live

Created Unassigned: Apps not being blocked during install [90]

$
0
0
Love this toolkit, but I'm having an issue on our Terminal Servers (2008 R2). I'm trying to update Java and have the installer checking for "iexplore,chrome,java,jucheck", kill them, and block their execution. I see in the log file that it does create the HKLM entries. The programs are killed, but users just start their browser back up.

I know I've tested this on desktops and they are blocked for the duration of the install.

Is anyone else running into this?

Commented Unassigned: Apps not being blocked during install [90]

$
0
0
Love this toolkit, but I'm having an issue on our Terminal Servers (2008 R2). I'm trying to update Java and have the installer checking for "iexplore,chrome,java,jucheck", kill them, and block their execution. I see in the log file that it does create the HKLM entries. The programs are killed, but users just start their browser back up.

I know I've tested this on desktops and they are blocked for the duration of the install.

Is anyone else running into this?
Comments: It is a valid request but it's possibly a tall order. I have some PS code to trigger stuff on an "Event" but I don't know if launching an application qualifies as a "supported event" to trigger on. Short of: * Disabling the mouse+Keyboard during install * Renaming the main EXEs of those blocked during install * Not installing during daytime (have a maintenance window instead) The best thing is to educate your users.

Commented Unassigned: Apps not being blocked during install [90]

$
0
0
Love this toolkit, but I'm having an issue on our Terminal Servers (2008 R2). I'm trying to update Java and have the installer checking for "iexplore,chrome,java,jucheck", kill them, and block their execution. I see in the log file that it does create the HKLM entries. The programs are killed, but users just start their browser back up.

I know I've tested this on desktops and they are blocked for the duration of the install.

Is anyone else running into this?
Comments: Thanks, but this is a documented feature of the PADT, it just does not appear to be working as expected. Since the PADT sets the HKLM entries (system-wide) to define a debugger for the executables to point to "C:\Users\Public\PSAppDeploy", it should fire for any user on the system when they attempt to restart their browser. Basically, the script sets "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\currentversion\image file execution options\<executablename> to define a "debugger" for the executable. In this case, it tells the OS to run PADT main script and display a message to the user that the app is disabled. After installation, this is removed. Now I'm wondering is if the Terminal Server Registry Redirection is kicking in so that while we think we are writing to HKLM, we are actually writing to a masked registry that other users are not seeing. I'll need to investigate that.

Commented Unassigned: Apps not being blocked during install [90]

$
0
0
Love this toolkit, but I'm having an issue on our Terminal Servers (2008 R2). I'm trying to update Java and have the installer checking for "iexplore,chrome,java,jucheck", kill them, and block their execution. I see in the log file that it does create the HKLM entries. The programs are killed, but users just start their browser back up.

I know I've tested this on desktops and they are blocked for the duration of the install.

Is anyone else running into this?
Comments: I double checked and the server is placed into Install mode before we configure the debugger, so registry redirection should not be an issue. I will attach both the "Deploy-Application.ps1" and the log for the most recent re-install. This is using the extracted .msi & .cab files from the 7u71 x86 installer. These are the only two files in the Files folder. In SupportFiles, I have our Java deployment files that I copy over after installation. In production, I use SCCM to deploy the application (not a task sequence), but for some reason cannot just specify "deploy-application.exe -TerminalServerMode", Looks like I have to pass it DeployType and DeployMode as well to get it to run. Also, the servers have PS v4 installed

Commented Unassigned: Apps not being blocked during install [90]

$
0
0
Love this toolkit, but I'm having an issue on our Terminal Servers (2008 R2). I'm trying to update Java and have the installer checking for "iexplore,chrome,java,jucheck", kill them, and block their execution. I see in the log file that it does create the HKLM entries. The programs are killed, but users just start their browser back up.

I know I've tested this on desktops and they are blocked for the duration of the install.

Is anyone else running into this?
Comments: And the log

Commented Unassigned: Apps not being blocked during install [90]

$
0
0
Love this toolkit, but I'm having an issue on our Terminal Servers (2008 R2). I'm trying to update Java and have the installer checking for "iexplore,chrome,java,jucheck", kill them, and block their execution. I see in the log file that it does create the HKLM entries. The programs are killed, but users just start their browser back up.

I know I've tested this on desktops and they are blocked for the duration of the install.

Is anyone else running into this?
Comments: Attaching the .ps1 again

New Post: Deployment Script: Citrix Receiver 14.1.0.0 (4.1)

$
0
0
Think it is a missing " ) " at the end of •If (([environment])::Is64BitOperatingSystem) -eq $true
I added it, and it works fine.

Created Unassigned: Calling Deploy-Application.exe with parameters does not work in windows 7 [91]

$
0
0
If I use the Deploy-Application.EXE –DeploymentType "Install" -DeployMode "NonInteractive" it does nothing in Windows 7. I have to run just the Deploy-Application.exe in order for it to work. If I add any parameter it stops working.
Calling the script directly like this .\Deploy-Application.ps1 –DeploymentType "Install" -DeployMode "NonInteractive" works.
In windows 8 everything works as expected.

I had this problem using SCCM I could not figure out why the Application did not install, after I tried the command manually I saw that not even the log folder is being created.


Great job by the way this toolkit is a lifesaver :)

Reviewed: PowerShell App Deployment Toolkit v3.2.0 (Oct 16, 2014)

$
0
0
Rated 5 Stars (out of 5) - I now package all my applications using this and have started to go back and repackage my old powershell installations. This toolkit rocks. Thank you!

New Post: Installing phase does not run in the script on one machine on 4

$
0
0
Version 3.1.0 AppDeployToolkitMain
OS : Microsoft Windows 7 Entreprise 64 bits 6.1.7601
Powershell : 2.0 or 3.0 x64
Mode : NonInteractive

Installing phase does not run in the script on one machine on 4

The installation phase is not visible in the log file :
Example KO :
[16-10-2014 23:00:22] [Initialization] Uninstall_MsftVisio_AllVersion_R01_X86_SN_P_MU setup started.
[16-10-2014 23:00:22] [Initialization] Script [C:\Windows\ccmcache\5b\AppDeployToolkit\AppDeployToolkitExtensions.ps1] dot-source invoked by [C:\Windows\ccmcache\5b\AppDeployToolkit\AppDeployToolkitMain.ps1]
[16-10-2014 23:00:22] [Initialization] Script [C:\Windows\ccmcache\5b\AppDeployToolkit\AppDeployToolkitMain.ps1] dot-source invoked by [C:\Windows\ccmcache\5b\Deploy-Application.ps1]
[16-10-2014 23:00:22] [Initialization] Uninstall_MsftVisio_AllVersion_R01_X86_SN_P_MU script version is [1.0.0]
[16-10-2014 23:00:22] [Initialization] Deploy Application script version is [3.1.0]
[16-10-2014 23:00:22] [Initialization] App Deploy Toolkit Main script version is [3.1.1]
[16-10-2014 23:00:22] [Initialization] App Deploy Toolkit Extensions version is [1.0.0]
[16-10-2014 23:00:22] [Initialization] PowerShell version is [3.0 x64]
[16-10-2014 23:00:22] [Initialization] PowerShell host is [ConsoleHost version 3.0]
[16-10-2014 23:00:22] [Initialization] OS version is [Microsoft Windows 7 Entreprise 64 bits 6.1.7601]
[16-10-2014 23:00:23] [Initialization] Hardware platform is [Physical]
[16-10-2014 23:00:23] [Initialization] Computer name is [XXXXXXX]
[16-10-2014 23:00:23] [Initialization] Current user is [CIB\XXXXXXX$]
[16-10-2014 23:00:23] [Initialization] Current Culture is [fr-FR] and UI language is [FR]
[16-10-2014 23:00:23] [Initialization] Deployment type is [Installation]
[16-10-2014 23:00:23] [Initialization] Running under Session 0.
[16-10-2014 23:00:23] [Initialization] Installation is running in [NonInteractive] mode.
[16-10-2014 23:00:24] [Post-Installation] Uninstall_MsftVisio_AllVersion_R01_X86_SN_P_MU Installation completed with exit code [0].
[16-10-2014 23:00:24] [Post-Installation] ----------------------------------------------------------------------------------------------------------

=> KO : Installation Phase is not present in the file log

Example OK :
[16-10-2014 23:00:31] [Initialization] Uninstall_MsftVisio_AllVersion_R01_X86_SN_P_MU setup started.
[16-10-2014 23:00:32] [Initialization] Script [C:\Windows\ccmcache\6x\AppDeployToolkit\AppDeployToolkitExtensions.ps1] dot-source invoked by [C:\Windows\ccmcache\6x\AppDeployToolkit\AppDeployToolkitMain.ps1]
[16-10-2014 23:00:32] [Initialization] Script [C:\Windows\ccmcache\6x\AppDeployToolkit\AppDeployToolkitMain.ps1] dot-source invoked by [C:\Windows\ccmcache\6x\Deploy-Application.ps1]
[16-10-2014 23:00:32] [Initialization] Uninstall_MsftVisio_AllVersion_R01_X86_SN_P_MU script version is [1.0.0]
[16-10-2014 23:00:32] [Initialization] Deploy Application script version is [3.1.0]
[16-10-2014 23:00:32] [Initialization] App Deploy Toolkit Main script version is [3.1.1]
[16-10-2014 23:00:32] [Initialization] App Deploy Toolkit Extensions version is [1.0.0]
[16-10-2014 23:00:32] [Initialization] PowerShell version is [3.0 x64]
[16-10-2014 23:00:32] [Initialization] PowerShell host is [ConsoleHost version 3.0]
[16-10-2014 23:00:32] [Initialization] OS version is [Microsoft Windows 7 Entreprise 64 bits 6.1.7601]
[16-10-2014 23:00:33] [Initialization] Hardware platform is [Physical]
[16-10-2014 23:00:33] [Initialization] Computer name is [XXXXXX]
[16-10-2014 23:00:33] [Initialization] Current user is [CIB\XXXXXXXX$]
[16-10-2014 23:00:33] [Initialization] Current Culture is [fr-FR] and UI language is [FR]
[16-10-2014 23:00:33] [Initialization] Deployment type is [Installation]
[16-10-2014 23:00:34] [Initialization] Running under Session 0.
[16-10-2014 23:00:34] [Initialization] Installation is running in [NonInteractive] mode.
[16-10-2014 23:00:34] [Installation] Microsoft Visio Premium 2010 Installed in A/R Programs
[16-10-2014 23:00:34] [Installation] UninstallString SubKey Installed
[16-10-2014 23:00:34] [Installation] Value = HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Office14.VISIO
[16-10-2014 23:00:34] [Installation] UninstallString Value Full
[16-10-2014 23:00:34] [Installation] Value = "C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller\setup.exe" /uninstall VISIO /dll OSETUP.DLL
[16-10-2014 23:00:34] [Installation] File Setup.exe Installed in "C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller"
[16-10-2014 23:00:34] [Installation] Run Uninstall Microsoft Visio Premium 2010 Mode Silent
[16-10-2014 23:00:34] [Installation] Command Run = "C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller\setup.exe" /uninstall Visio /config "C:\Windows\ccmcache\6x\Files\Uninstall\VisioPremium2010\UninstallVisioSilent.xml"
[16-10-2014 23:03:58] [Installation] Return Code Uninstall : Success = 0

=> OK : Installation Phase is present in the file log

Thank you in advance for your help
Fabrice ( French )

New Post: Installing phase does not run in the script on one machine on 4

$
0
0
the error comes from my script !
indeed it does not execute anything in the installation phase.
sorry for this post
thank you
Fabrice

Reviewed: PowerShell App Deployment Toolkit v3.2.0 (Oct 17, 2014)

$
0
0
Rated 5 Stars (out of 5) - Everything that I have been looking to do with Application Deployments in SCCM has always been hindered by a couple things. Non-standard scripts to install, needing the user to shut certain programs down and keep them closed - even the program returning a reboot code when I tried to suppress. This toolkit has allowed me to resolve all of these issues. If it weren't for the fact that others have reviewed it - I would have assumed they wrote it with me in mind! This tool will make any Application Deployment much, much better. I wish I could give it more than 5 stars!

New Post: Specified cast is not valid. (at

$
0
0
I am also have the same error in the Get-InstalledApplication function as part of an uninstall. I am using the toolkit to install Java 7 Update 71 and have it attempt to remove any previous version of Java 6 or 7. So far I know of only one system that is giving me this error in a deployment of about 500.

So, from "Deploy-Application.ps1"
Remove-MSIApplications "Java(TM) 6 Update"
From "_Java_7Update71_x86_EN_01_PSAppDeployToolkit_Install.log"
[16-10-2014 18:22:58] [Pre-Installation] Getting information for installed Application Name [Java(TM) 6 Update]...
[16-10-2014 18:22:58] [Pre-Installation] Specified cast is not valid.
(at <ScriptBlock>, C:\Windows\ccmcache\m9\AppDeployToolkit\AppDeployToolkitMain.ps1: line 1053
at Get-InstalledApplication, C:\Windows\ccmcache\m9\AppDeployToolkit\AppDeployToolkitMain.ps1: line 1053
at Remove-MSIApplications, C:\Windows\ccmcache\m9\AppDeployToolkit\AppDeployToolkitMain.ps1: line 1305
at <ScriptBlock>, C:\Windows\ccmcache\m9\Deploy-Application.ps1: line 109)
I am using version 3.2.0 of the toolkit and from the logs you can see I am using SCCM (2012 R2) for this deployment. OS for this user is Windows 8.1 x64 and his system has Java 7 Update 67 and Java Dev Kit 8.5; it does not have any version of Java 6 installed. Line 1053 in "AppDeployToolkitMain.ps1" deals with looping through all the currently installed applications and their uninstallation properties in the registry so my guess would be that my user has a program installed that has some properties with special characters in it that is throwing off PowerShell. I will continue gathering some data from the system to see if I can confirm my theory but I saw this thread and thought I should share what I have found so far.

Thanks!

New Post: Specified cast is not valid. (at

$
0
0
I found the offending key in the registry, but I can't figure out what it doesn't like about it. The error is specifically coming from the command:
Get-ItemProperty -LiteralPath $_.PsPath
Found on line 1053 in "AppDeployToolkitMain.ps1" as part of a larger command. This command works fine except for these two PSPaths:
Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\nbi-glassfish-mod-4.0.0.89.0
Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\nbi-nb-base-8.0.0.0.201403101706
Trying to execute the command manually gives me the same error
Get-ItemProperty -LiteralPath 'Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\nbi-glassfish-mod-4.0.0.89.0'

Get-ItemProperty : Specified cast is not valid.
At line:1 char:1
+ Get-ItemProperty -LiteralPath "Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_M ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-ItemProperty], InvalidCastException
    + FullyQualifiedErrorId : System.InvalidCastException,Microsoft.PowerShell.Commands.GetItemPropertyCommand
So these two applications are nothing special, GlassFish Server and NetBeans IDE, but why does this command have such and issue with these Registry Key names? I know removing the programs and deleting the keys would probably get things working as far as the toolkit is concerned but I would rather find out why it is having a problem instead of just working around it. Anyone have any ideas?

New Post: Specified cast is not valid. (at

$
0
0
Found the issue, underneath these keys was a DWORD value with invalid data. Once I deleted that value it worked as expected. For the OP, I was able to find what keys were having the problem using this script:
$regKeyApplications = @( "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" )
Foreach ($regKey in $regKeyApplications ) {
    If (Test-Path $regKey -ErrorAction SilentlyContinue) {
        $regKeyApplication = Get-ChildItem $regKey -ErrorAction SilentlyContinue | ForEach-Object { 
            Write-Host $_.PsPath
            Get-ItemProperty -LiteralPath $_.PsPath 
            }
    }
}
This script is essentially just the lines of code from "AppDeployToolkitMain.ps1" that were having the original error. I changed it very slightly to output the PSPath to console before Get-ItemProperty was called so that I could match up the errors to the registry key that was having the problem. Hopefully this can help the OP.

Thanks for the great toolkit!

New Post: Deployment Script: Oracle Java Runtime 1.7.0.51

$
0
0
Hello Jerre,

I have not used serviceui.exe, can you please share the procedure to make of this tool.

fyi: in my environment end users do not have administrative right.

New Post: Simple ActiveSetup

$
0
0
I needed a simple Active Setup, just to add a single registry key. Seems to be the most common task I run into when dealing with Active Setup. The other scripts offer much more functionality but I wanted to keep it simple.

It merely add two functions, one to add an ActiveSetup entry and one to remove. It does support multiple entries, but you will need to number them by hand.
function Add-ActiveSetup([int]$Number, [string]$Command) {

# This function creates an ActiveSetup entry in the registry. This can be used to rerun an application per user
# or add HKCU registry keys.
#
# Usage is simply Add-ActiveSetup -Number # -Command <command>
#
# $Number is utilized to run multiple commands (and remove individual commands at uninstall)
# $Command is the command you wish to run.
#
# Example: Add-ActiveSetup -Number 1 -Command 'reg add "HKCU\Software\Applications\Settings" /v "ProductKey" /d "159SAGFASGFASDFAS2KCYY6D7Z2" /t REG_SZ /f'

    write-log "Creating ActiveSetup entry number: $number"
    write-log "Uisng command : $command"

    if (!(Get-RegistryKey -Key "HKEY_LOCAL_MACHINE\SOFTWARE\PSAppDeploy\$appName.$number")){

    Function GenerateGUID {

        #Declare Local Memory
        Set-Variable -Name GetGUID -Scope Local -Force
    
        $GetGUID = [guid]::NewGuid()
        $GetGUID = $GetGUID.ToString().ToUpper()
        
        return $GetGUID

        #Cleanup Local Memory
        Remove-Variable -Name GetGUID -Scope Local -Force
   
    }

    $GUID = GenerateGUID

    Set-RegistryKey -Key "HKEY_LOCAL_MACHINE\SOFTWARE\PSAppDeploy\$appName.$Number"  -Name "GUID" -Value "{$GUID}" -Type String

    Set-RegistryKey -Key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{$GUID}" -Name "Version" -Value $appVersion -Type String
    Set-RegistryKey -Key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{$GUID}" -Name "Component" -Value $appName.$Number -Type String
    Set-RegistryKey -Key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{$GUID}" -Name "StubPath" -Value $command -Type String

    }
}

function Remove-ActiveSetup ([int]$Number) {
    
    $GUID = Get-RegistryKey "HKEY_LOCAL_MACHINE\SOFTWARE\PSAppDeploy\$appName.$Number" -Value "GUID"

    Remove-RegistryKey -Key "HKEY_LOCAL_MACHINE\SOFTWARE\PSAppDeploy\$appName.$Number"
    Remove-RegistryKey -Key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\$GUID"

}

New Post: test whether app is in use, else just update it.

$
0
0
Hi

I have been using an if/else in my scripts to test if the program/app I want to update is running and if it is, THEN I'll show the 'welcome' screen and have the user upgrade it himself.
if app not running, then the script will just update the app.

I was wondering if it was an idea to integrate this into the base functionality of the psappdeployment script?

maybe a switch you add to the deployment or something similar...

this is of course partly me being lazy and not just doing the if/else everytime but I was thinking that it might be useful to have this on our toolbox as well.

why should we wait for the user to do interact with an update of a program if that program isn't running at the time the deployment script starts.

this would be the least intrusive way to deploy software..



Thoughts?

New Post: test whether app is in use, else just update it.

$
0
0
Just use the -AllowDeferCloseApps parameter! It will only display prompt if there are running apps.

New Post: Block-AppExecution function....

$
0
0
Thanks for flagging the schtasks issue, we've got it on our list to fix.
Viewing all 2341 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>