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

New Post: Change DeployMode during the pre-installation?

$
0
0
Is there a way to change the deploy mode from Interactive to Silent during the pre-installation?
I can get it to not show-installationprogress but it still shows the balloon popup at the end saying installation is complete. How can I get rid of the balloon prompt? My attempted script below still shows the balloon....

added variable for show-installationprogress. looks for the fadesktop process.

$processActive = Get-Process FADesktop -ErrorAction SilentlyContinue

if/else looks for the active process. if not running it installs silently. if running it prompts to close and shows installation progress window.

If($processActive -eq $null) { [string] $DeployMode = "Silent" }

Else {
Show-InstallationWelcome -CloseApps "FADesktop"
Show-InstallationProgress "Installing UpdatennPlease wait...nnInstallation will take 1-2 minutes"
}

New Post: New to the PDT

$
0
0
Hi There,

I just started learning this tool and find this tool might help me with my project. I have been asked to upgrade the Adobe reader and Flash on client's machine due to recent security vulnerability. I have read the documentation and would like to know where I can get the Application source files as mentioned in the doc's sample of Adobe Reader installation? I went to Adobe's ftp site and the files after I uncompressed it seems not same as the one in the doc.

Can anybody direct me to the right location? Also if it is possible for Adobe Flash too?

Thank you in advance.

PshellFan

New Post: Applications that need to be closed

$
0
0
Easiest way:
Hop on a computer that has the applications installed that you want to find the names of. Open Task Manager. If in Win7, right click on Application name, "Go to Process" there's your name you need. If in Win8, Open Task Manager, right click Application name, "Go to Details" and there's your name you need.

New Post: New to the PDT

New Post: Countdown and Restart Prompt

$
0
0
Hello,

i would like working with a Restart Required Window and Countdown.

i work with this line Show-InstallationRestartPrompt -Countdownseconds 600 -CountdownNoHideSeconds 60 and it looks fine but is it possible that i change the default button RESTART NOW to RESTART LATER???

When a User is very fast to writing and he doesn´t read the line and klick enter so the machine will restart directly and this is not so good.

So again, is it possible to change the default button???

Thanks a lot. ;)

New Post: Change DeployMode during the pre-installation?

$
0
0
Set deployment mode to silent in the Deploy-Application.ps1 script using variable or Params. Other option is doable balloon notifications in XML configuration.

New Post: Countdown and Restart Prompt

$
0
0
Second request we've had for this. Don't have the answer now but please log under issues as a feature request and we'll look in to it.

New Post: Show-InstallationRestartPrompt, modify default button.

$
0
0
We'll look to add to next release, we got a second request for the same from another user.

Created Unassigned: Feature Request: Change Button between Restart Now and Later [82]

$
0
0
i would like working with a Restart Required Window and Countdown.

i work with this line Show-InstallationRestartPrompt -Countdownseconds 600 -CountdownNoHideSeconds 60 and it looks fine but is it possible that i change the default button RESTART NOW to RESTART LATER???

When a User is very fast to writing and he doesn´t read the line and klick enter so the machine will restart directly and this is not so good.

So again, is it possible to change the default button???

Thanks a lot. ;)

Commented Unassigned: Feature Request: Change Button between Restart Now and Later [82]

$
0
0
i would like working with a Restart Required Window and Countdown.

i work with this line Show-InstallationRestartPrompt -Countdownseconds 600 -CountdownNoHideSeconds 60 and it looks fine but is it possible that i change the default button RESTART NOW to RESTART LATER???

When a User is very fast to writing and he doesn´t read the line and klick enter so the machine will restart directly and this is not so good.

So again, is it possible to change the default button???

Thanks a lot. ;)
Comments: Workaround for now: To get what you want, in AppDeployToolkitMain.ps1, swap the __TabIndex__ numbers in the 2 lines below ( 0 and the 2 ) ``` # Label Restart Later <code> $buttonRestartLater.TabIndex = 0 <code> # Label Restart Now <code> $buttonRestartNow.TabIndex = 2 <code> ``` Personally, I think the real solution is to not have neither selected or maybe disable buttons for the first second or two. But that's up to the developers.

New Post: New to the PDT

$
0
0
Thank you for the reply Souporman.

Just want to share my first experience with the PSAppdeploytoolkit Adobe Reader update script. I am planning to upgrade to version 11.0.08 which is a bit different than the doc.

Steps:
  1. Downloaded the Application Source file (AdbeRdr11008_en_US.exe) at http://get.adobe.com/reader/enterprise/ or ftp://ftp.adobe.com/pub/adobe/reader/win/11.x/11.0.08/en_US/
  2. Refer to section 2 and 3 on http://community.spiceworks.com/how_to/show/27718-install-update-adobe-reader-to-to-latest-adobe-reader-xi-11-0-2-using-cmd
    At the end you will have AcroRead.msi and AcroRead.mst
  3. Edit Deploy-Application.ps1 file ccordingly (refer to documentation). Note: When I copied pasted some of the command lines from the documentation to the Deploy-Application.ps1, I notice some of the character were not pasted properly which caused syntax error when you tried to execute the script. For example:
"Remove-MSIApplications" it supposed to be with "Dash" instead of "Hyphen"
  1. Add extra patch line to upgrade from 11.0.07 t0 11.0.08:
Execute-MSI -Action Patch -Path "AdbeRdrUpd11007.msp"

Execute-MSI -Action Patch -Path "AdbeRdrSecUpd11008.msp"

note: it supposed to be with "Dash" instead of "Hyphen"

Cheers,
PShellFan

Commented Unassigned: Feature Request: Change Button between Restart Now and Later [82]

$
0
0
i would like working with a Restart Required Window and Countdown.

i work with this line Show-InstallationRestartPrompt -Countdownseconds 600 -CountdownNoHideSeconds 60 and it looks fine but is it possible that i change the default button RESTART NOW to RESTART LATER???

When a User is very fast to writing and he doesn´t read the line and klick enter so the machine will restart directly and this is not so good.

So again, is it possible to change the default button???

Thanks a lot. ;)
Comments: Thanks a lot, that´s running fine for me. :) with best regards André Jansen

Created Unassigned: -Patch Parameter for Execute-MSI [83]

$
0
0
Could you please implement a -Patch parameter similiar to the -Transform parameter?

I do not want to override the default switches everytime ive to specify patches.

e.g For Adobe Products its not recommended to slipstream the MSPs into the main MSI.

Regards,
Fabio

Created Unassigned: User not properly detected when using RDP [84]

$
0
0
When starting an update (we use ps app deploy for creating custom patches - on wsus) process while being logged on to the machine via Remote Desktop the user is not properly recocnized. This becomes an issue when applications are supposed to be closed because the window that allows to close the application is invisible to the user.
We might have a bit of a strange usage since the packages are run by the windows update agent (wua) with system priviliges and we use ServiceUi to punch it into the user session (the complete powershell script). This has been working quite well but today i noticed the issue while testing an update on an rdp connection.

[17-09-2014 14:37:08] [Initialization] No User is logged on
[17-09-2014 14:37:09] [Initialization] Session 0 not detected.
[17-09-2014 14:37:09] [Initialization] Installation is running in [Interactive] mode.

When logging on the same computer without RDP the message window with the notification to close a certain application appears and the update process continues.

[17-09-2014 14:44:16] [Initialization] The following users are logged on to the system: domain\user
[17-09-2014 14:44:16] [Initialization] Session 0 not detected.
[17-09-2014 14:44:16] [Initialization] Installation is running in [Interactive] mode.

A while ago i wrote an script to detect logged on users and noticed that quering wmi will not return users that are logged on via rdp, maybe this is the same issue

Commented Unassigned: User not properly detected when using RDP [84]

$
0
0
When starting an update (we use ps app deploy for creating custom patches - on wsus) process while being logged on to the machine via Remote Desktop the user is not properly recocnized. This becomes an issue when applications are supposed to be closed because the window that allows to close the application is invisible to the user.
We might have a bit of a strange usage since the packages are run by the windows update agent (wua) with system priviliges and we use ServiceUi to punch it into the user session (the complete powershell script). This has been working quite well but today i noticed the issue while testing an update on an rdp connection.

[17-09-2014 14:37:08] [Initialization] No User is logged on
[17-09-2014 14:37:09] [Initialization] Session 0 not detected.
[17-09-2014 14:37:09] [Initialization] Installation is running in [Interactive] mode.

When logging on the same computer without RDP the message window with the notification to close a certain application appears and the update process continues.

[17-09-2014 14:44:16] [Initialization] The following users are logged on to the system: domain\user
[17-09-2014 14:44:16] [Initialization] Session 0 not detected.
[17-09-2014 14:44:16] [Initialization] Installation is running in [Interactive] mode.

A while ago i wrote an script to detect logged on users and noticed that quering wmi will not return users that are logged on via rdp, maybe this is the same issue
Comments: Now that's an exotic bug you got there. I think you might have to write some code yourself though. Why can't you just lookup the running processes and look for things like WinWord.exe, etc and kill them? If SYSTEM can't see those you might have to kill the RDP Service before you run your package.

Commented Unassigned: Feature Request: Change Button between Restart Now and Later [82]

$
0
0
i would like working with a Restart Required Window and Countdown.

i work with this line Show-InstallationRestartPrompt -Countdownseconds 600 -CountdownNoHideSeconds 60 and it looks fine but is it possible that i change the default button RESTART NOW to RESTART LATER???

When a User is very fast to writing and he doesn´t read the line and klick enter so the machine will restart directly and this is not so good.

So again, is it possible to change the default button???

Thanks a lot. ;)
Comments: Glad to be of help.

New Post: Help! Execute-Process passing arguments to an MSI with a Transform

$
0
0
I simply cannot get a Transform to include into this line without throwing a 1639 or 1203 error. I can get it working fine if I remove the "-Transform $dirFiles\WorkingP\Filename.mst" section and it installs the EXE and MSI. But I cannot include the Transform... Any idea why? What am I doing wrong?

Execute-Process -FilePath "$dirFiles\WorkingP\setup.exe" -Arguments "/S /v" /qb -Transform $dirFiles\WorkingP\Filename.mst /norestart"" -Wait

New Post: Set-ActiveSetup and Remove-ActiveSetup: Per-user changes (as requested)

$
0
0
  • Added -Arguments parameter
  • $ActiveSetupPath renamed to $StubExePath
  • The function to make -Purge work is still not done and I have no time to finish it for now. Using -Purge will give you an error
Function Set-ActiveSetup {
<#
.SYNOPSIS
    Creates an Active Setup entry in the registry and copies the StubPath file if needed.
    
.DESCRIPTION
    Version: 0.6 - Author: CodePlex's That_annoying_guy - 2014 Sept 05 - BETA USE AT YOUR OWN RISK!!
    
    Active Setup is a built-in feature of Windows to handle per-user changes
    A registry key is created in HKLM and *as users login*, the user runs the "Stub" in the StubPath value and copies the Version value to HKCU in a matching Key
    If the Version value in HKLM is higher than the version value in HKCU, the StubPath is ran again when a user logs in.   
    This Function:
    -Creates the registry entries in HKLM:\Software\Microsoft\Active Setup\Installed Components\$installName
    -Creates StubPath value depending on the file extension of the $StubExePath parameter
    -Handles Version value with YYYYMMDDHHMMSS granularity to permit re-installs 
    in the same day and still trigger Active Setup as users logon.
    -Copies the Stub file to $StubExePath is not already there and if it's in $scriptDirectory
    -Runs the Stub for the user that is installing (no need to logout/login to trigger Active Setup)

.LINK
    http://www.sepago.de/d/helge/2010/04/22/active-setup-explained  
    
.SYNTAX
    Set-ActiveSetup -StubExePath <PathToStub> [-Arguments "MyArgs"][-Description "MyDesc"][-Key "KeyName"][-Locale "en"][-IsInstalled $false]
    
.EXAMPLE
    Set-ActiveSetup -StubExePath $PathToMyActiveSetup -Arguments "MyArgs" -Description "MyDesc" -Key "KeyName" -Locale "en" -IsInstalled $false
    Set-ActiveSetup "$PKGUNINSTALLDIR\MyApp_v1r1_HKCU.exe"
    Set-ActiveSetup "$PKGUNINSTALLDIR\MyApp_v1r1_HKCU.VBS"
    Set-ActiveSetup "$PKGUNINSTALLDIR\MyApp_v1r1_HKCU.CMD"
    Set-ActiveSetup "$PKGUNINSTALLDIR\MyApp_v1r1_HKCU.PS1"
    Set-ActiveSetup "C:\Program Files\MyApp\MyApp_v1r1_HKCU.JS"

.BAD_EXAMPLE
    Set-ActiveSetup "MyApp_v1r1_HKCU.exe" 
    This will not work. We need a full path to where it is or will go!
    
.PARAMETER -StubExePath
    -Full path to the EXE/VBS/CMD/PS1/JS that will be launched for each new and existing user profile.
    -This will be used as path of the StubPath value in Active Setup in HKLM
    -If the file does not exists at $StubExePath, it is copied from $scriptDirectory
    -Note: -StubExePath and -Arguments are combined in the StubPath value

.PARAMETER -Arguments
    -Optional Arguments to send to the EXE/VBS/CMD/PS1/JS file above 
    -Note: -StubExePath and -Arguments are combined in the StubPath value

.PARAMETER -Description
    -Optional Description for the Active Setup. 
    -Users will see "Setting up personalised settings for: $Description" at logon
    -Defaults to $installName if blank

.PARAMETER -Key
    -Optional Name of registry Key name used for the Active Setup.
    -Defaults to $installName if blank
    
.PARAMETER -Locale
    -Optional. Arbitrary string used to specify the installation language of the stub
    -Not replicated to HKCU. Only used for identification purposes inn HKLM. Ignored if omitted.
    
.PARAMETER -Purge
    -Will load each HKCU hive (.Dat file) to remove Active setup key.
    -For those who love overkill.
    
.NOTES
    Your ActiveSetupStub file can be copied to $StubExePath via the MSI or other means. In which case it is only stubbed in HKLM
    If ActiveSetupStub file is in the pkg container and not in $StubExePath, it is copied to $StubExePath and stubbed in HKLM.

    TBD: [bool]$global:ACTIVESETUP_DISABLE can be used to prevent the Active Setup from being created (Needed?)
    TODO: Add 32/64Bit support. (Current version is 64-bit only but I've been told this is important)

    Publishing CAVEATS: 
    $PKGUNINSTALLDIR is used in Author's modified version of the ToolKit. This feature is not in Original TK
    
    How to add to AppDeployToolKit (Too Lazy; Don't Read version):
    Edit \AppDeployToolkit\AppDeployToolkitExtensions.ps1 to add theses functions
    
    Add this line in 
        
.COMPONENT
    Depends on TK's Copy-File, Execute-Process and Write-Log functions
    
#>
    Param(
        [Parameter(Mandatory = $true)]
        [string]$StubExePath = $(throw "StubExePath Param required"),
        [string]$Arguments,
        [string]$Description=$installName,
        [string]$Key=$installName,
        [string]$Locale,
        [bool]$IsInstalled
    )

    # CAVEAT: Version value is limited in # of digits and cannot do yyyyMMddHHmmss
    # Currently, it is known that 8 consecutive digits is one limit. (yyMMddHHmm)
    # Extra digits above 8 are ignored and will not trigger Active Setup
    # We are using commas to get more digits and it still triggers Active Setup
    [String]$Version=Get-Date -format "yyMM,ddHH,mmss"  #1405,1515,0522
    [String]$ActiveSetupKey="HKLM:\Software\Microsoft\Active Setup\Installed Components\$Key"
    [String]$ActiveSetupKey4Reg="HKLM\Software\Microsoft\Active Setup\Installed Components\$Key"
    [String]$HKCU_ACTIVESETUPKEY="HKCU:\Software\Microsoft\Active Setup\Installed Components\$Key"

    #CAVEAT: Deprecated feature (Deprecated = May disappear in a future version)
    IF ($global:ACTIVESETUP_DISABLE) { 
        Write-Log "WARNING: ActiveSetup is disabled for this package. Exiting Set-ActiveSetup() function..."
        return
    }

    #Copy file to StubExePath if needed
    #Your Stub file can be copied to $StubExePath via the MSI or other means. In which case it is only stubbed in HKLM
    #If the Stub file is in the pkg container and not in $StubExePath, it is copied to $StubExePath and stubbed in HKLM.
    [string]$StubExePath=[Environment]::ExpandEnvironmentVariables($StubExePath) # to handle %EnvVars%
    [string]$ActiveSetupFileName=[System.IO.Path]::GetFileName($StubExePath) #FYI: .Net does not care if $StubExePath exists
    If (Test-Path "$scriptDirectory\$ActiveSetupFileName") {
        #CAVEAT: This will overwrite the Stub file if $StubExePath already exists on target
        Copy-File -Path "$scriptDirectory\$ActiveSetupFileName" -Destination "$StubExePath" -ContinueOnError $false
    }   
    
    If (!(Test-Path $StubExePath)) { Throw "ERROR: ActiveSetup Stub file [$($ActiveSetupFileName)] is missing." }
    
    If ($Purge) {
        Write-Log "Removing old $ActiveSetupKey on all other User hives on machine..."
        #Cleans out previous ActiveSetup Key in each user profile (for overkill lovers)
        Remove-RegistryKeyFromAllHives $ActiveSetupKey
    }
    
    #set $StubPath according to file Extension of $StubExePath
    If       ($StubExePath.Substring($StubExePath.Length-3,3) -eq "exe") {
        $StubPath="$StubExePath $Arguments"
    } ElseIf ($StubExePath.Substring($StubExePath.Length-3,3) -eq "vbs") { 
        $StubPath="$envWinDir\System32\wscript.exe //nologo `"$StubExePath`" $Arguments"
    } ElseIf ($StubExePath.Substring($StubExePath.Length-3,3) -eq "cmd") { 
        $StubPath="$envWinDir\System32\CMD.exe /C `"$StubExePath`" $Arguments"
    } ElseIf ($StubExePath.Substring($StubExePath.Length-3,3) -eq "ps1") { 
        $StubPath="$envWinDir\System32\WindowsPowerShell\v1.0\powershell.exe `"$StubExePath`" $Arguments"
    } ElseIf ($StubExePath.Substring($StubExePath.Length-3,3) -eq ".js") { 
        $StubPath="$envWinDir\System32\wscript.exe //nologo `"$StubExePath`" $Arguments"
    } Else { Throw "Unsupported ActiveSetup Stub file" }


    #TBD: use TK's Set-RegistryKey when things work, but might be overkill
    if (!(Test-Path $ActiveSetupKey)) {md $ActiveSetupKey -force} #force =create multiple levels at a time
    Write-Log "ActiveSetup StubPath     =$StubPath"
    set-itemproperty -path $ActiveSetupKey -name Stubpath -value $StubPath -force #Force=overwrite
    Write-Log "ActiveSetup Version      =$Version"
    set-itemproperty -path $ActiveSetupKey -name Version -value $Version -force #Force=overwrite
    Write-Log "ActiveSetup Description  =$Description"
    set-itemproperty -path $ActiveSetupKey -name '(Default)' -value $Description -force
    If ($Locale) { 
        Write-Log "ActiveSetup $Locale  =$Locale"
        set-itemproperty -path $ActiveSetupKey -name Locale -value $Locale -force }
    If (!($IsInstalled)) { 
        Write-Log "ActiveSetup $IsInstallede  =$IsInstalled"
        set-itemproperty -path $ActiveSetupKey -name IsInstalled -value $IsInstalled -force }
    #"%BITS6432DIR%\REG.EXE" DELETE "%HKCU_ACTIVESETUPKEY%" /v Version /f 1>nul 2>nul


    Write-Log "Exporting just-created Active Setup Key..."
    Execute-Process -FilePath "$envWinDir\System32\Reg.exe" -Arguments "EXPORT `"$ActiveSetupKey4Reg`" `"$envTemp\${installName}_ActiveSetup_KEY.log`" /y" -WindowStyle Minimized
    If (Test-Path "$envTemp\${installName}_ActiveSetup_KEY.log") {
        Type "$envTemp\${installName}_ActiveSetup_KEY.log" | Write-Log
        Del "$envTemp\${installName}_ActiveSetup_KEY.log" -Force -ErrorAction SilentlyContinue
        Write-Log "Export of key complete"
    }


    #CAVEAT: This "$RunningAsSystem" chunk is highly likely to be moved to another function
    $SIDCollection="LocalServiceSid","LocalSid","NetworkServiceSid","NetworkSid","NTAuthoritySid","LocalSystemSid"
    [bool]$RunningAsSystem=$false
    foreach ($Sid in $SIDCollection) {
        If ([System.Security.Principal.WindowsIdentity]::GetCurrent().User.IsWellKnown(
            [System.Security.Principal.WellKnownSidType]::$Sid)) {$RunningAsSystem=$true}
    }


    #Run ActiveSetup for Current User that is installing (This includes Citrix) but not SMS/SCCM
    If ($RunningAsSystem) { 
        Write-Log "INFO: System Account detected: Not Running ActiveSetup Stub for Current User."
    } Else {
        Write-Log "Launching StubPath for Current User..." # And test StubPath
        #&$StubPath #The term 'C:\Windows\System32\wscript.exe //nologo "c:\TEMP\MyApp_v1r1_HKCU.vbs"' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. ()
        #Execute-Process -FilePath $StubPath #NG b/c we need to separate out the arguments.
        Invoke-Item $StubPath   #Not what I wanted but it works
    } 
    Write-Log "Set-ActiveSetup done.`n"
}

New Post: Help! Execute-Process passing arguments to an MSI with a Transform

$
0
0
I got this figured out using the below script actually. This might be good to have in the help section.
Execute-Process -FilePath "$dirFiles\WorkingP\setup.exe" -Arguments "/S /v" /QB TRANSFORMS=filename.mst /norestart"" -Wait

New Post: Help! Execute-Process passing arguments to an MSI with a Transform

$
0
0
It looks like you just mixed up your switches with the ones available for Execute-MSI. Probably not something that needs to go in the Help, though, as you don't normally transform .exe setups and it isn't always an option. Personally, I prefer to extract the MSI from setups like the one you have and then just work with that--especially if I'm transforming it.
Viewing all 2341 articles
Browse latest View live


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