PSAppDeployToolkit 3.8.3

Version 3.8.3 [01/10/2020]
Releases

  • Added function Set-ItemPermission that allows you to easily change permissions on files or folders.
  • Added setting READ permissions to BUITLTIN\Users for toolkit’s temporary folder so they can get the popup message.
  • Added -AddParameters for Execute-MSP, that lets you add additional parameters.
  • Added -ExecuteForCurrentUser for Set-ActiveSetup, which allows you to disable executing the StubExePath for the current user.
  • Added -UseShellExecute for Execute-Process:
    • WindowStyle Hidden doesnt usually work without this parameter on. CreateNoWindow will usually not work without this off.
    • This parameter changes the way the application is started. It is similar to entering a path into the Run dialog or into the Windows Explorer. If it is a file not an application, then the Shell will open it in a program assigned for this extension. The Shell does not stand for command shell but for operating system shell. It also changes how Working Directory is used.
    • If this parameter is set to $true there is no output/error stream. Only an exit code. Default value is $false which was also the case before, however you couldnt change it through parameters previously.
    • Expanded description for WindowStyle, CreateNoWindow and WorkingDirectory parameters.
  • Added return value for Execute-Process with -PassThru and -NoWait specified: Returns an object with Id, Handle and ProcessName.
  • Added config paths to the config file for installations where RequireAdmin is False.
  • Added revised documentation which is now included as a PDF.
  • Changed Variables to no longer rely on the system variable PATH for system applications.
  • Changed default -Source value for Write-Log to a more useful value: it will be set to Parent’s function name and if not inside a function then the name of the script. If not inside a function or a script, then the value will be set to ‘Unknown’.
  • Changed UnBlock-AppExecution and Block-AppExecution so they don’t run without admin rights. Instead of throwing an error, they only write and entry to the log.
  • Changed Execute-MSI so when the action is Patch, two variables REINSTALL and REINSTALLMODE are appended to parameters as specified here: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/msiexec#update-options
  • Changed timestamp of compressed toolkit logs to 24h format to avoid possible double filenames.
  • Changed Get-ScheduledTask to Get-SchedulerTask to resolve the conflict on Windows 10 and added an alias on Powershell versions where this function does not exist.
  • Changed logging inside Convert-RegistryPath to be disabled by default, to decrease log clutter.
  • Changed registry paths to no longer use registry PSDrives and contain full paths.
  • Changed Show-InstallationPrompt so the window scales with the amount of text entered and removed unused space. If there is no icon specified, the text will scale the entire width too.
  • Changed Show-InstallationRestartPrompt so it restarts the computer in Silent and VerySilent deploy modes.
    • Added NoSilentRestart parameter for the function to retain previous behaviour, which defaults to True.
    • Renames ‘Restart Later’ to ‘Minimize’ to make it more clear to the user.
  • Fixed visual bugs in Show-InstallationWelcome.
    • The application name is now always displayed.
    • Fixed uncentered text.
    • Height of the window is now not limited and scales with the text.
    • Removes unused variables.
  • Fixed uses of Execute-Process throughout the toolkit with the -PassThru parameter since -PassThru no longer ignores exit codes.
  • Fixed issue with $envOSVersionRevision not being populated on Windows 8 because the “UBR” registry value is only being checked if “$envOSVersionMajor = 10”.
  • Fixed an issue where the correct ProgramFiles and CommonProgramFiles paths were not populated if the Toolkit was launched from a 32-bit process on a 64-bit OS.
  • Fixed Powershell 2.0 issues with GetHostEntry and GetFolderPath.
  • Fixed the issue with config file being read incorrectly and showing incorrect charaters in the UI.
  • Fixed Get-UserProfiles so it ignores “defaultuser0” account.
  • Fixed a rare issue in Execute-ProcessAsUser causing an error, because of a negative index for SubString.
    • Improved logging in the function.
    • CMD will now be started silently without a popup just like powershell.

Will the release of v4 will be in 2020 or will it be for next year 2021 ?

It is unlikely that it comes out this year.

I look yesterday on github, is there anywhere i can check the sources of the upcoming version ?

No, we are working on it in a private repository.

1 Like

I have run into issue with version 3.83. If I run this Execute-MSI to install an msi file with parameters then it runs fine, however same command line in deploy-application.ps1 then it only executes the msi not parameters. Anyone run into this problem?

Can you elaborate? Do you mean that older version works but this one does not add parameters?

Yes I were able to run this command in 3.8.1
While (Execute-MSI -Action Install -Path “$dirFiles\ArcGISPro.msi” -Parameters ‘ALLUSERS=1 ENABLEEUEI=0 CHECKFORUPDATESATSTARTUP=0 /qb!’) {
Start-Sleep 60;
Write-Log -Message “$appName $appVersion is still not finished installing, sleeping another 60 seconds” -Source $deployAppScriptFriendlyName;
} and it does add the parameters in 3.8.1. However on 3.8.3 the parameters does not get added. it only ran the msi installation without parameters.

So to have the parameters working on 3.8.3. I have to comment out this part in Deploy-Application.ps1:

	## Handle Zero-Config MSI Installations
	If ($useDefaultMsi) {
		[hashtable]$ExecuteDefaultMSISplat =  @{ Action = 'Install'; Path = $defaultMsiFile }; If ($defaultMstFile) { $ExecuteDefaultMSISplat.Add('Transform', $defaultMstFile) }
		Execute-MSI @ExecuteDefaultMSISplat; If ($defaultMspFiles) { $defaultMspFiles | ForEach-Object { Execute-MSI -Action 'Patch' -Path $_ } }
	}

The variables changed will be visible in the msi log. Verify that they arent changed in the log.

It does change in the log:

[Installation] :: Executing MSI action [Install]… Execute-MSI 12/2/2020 9:17:30 AM 13948 (0x367C)
[Installation] :: [C:\WINDOWS\System32\msiexec.exe] is a valid fully qualified path, continue. Execute-Process 12/2/2020 9:17:30 AM 13948 (0x367C)
[Installation] :: Check to see if mutex [Global_MSIExecute] is available. Wait up to [10 minute(s)] for the mutex to become available. Test-IsMutexAvailable 12/2/2020 9:17:30 AM 13948 (0x367C)
[Installation] :: Mutex [Global_MSIExecute] is available for an exclusive lock. Test-IsMutexAvailable 12/2/2020 9:17:30 AM 13948 (0x367C)
[Installation] :: Working Directory is [C:\Windows\ccmcache\Toolkit\Files]. Execute-Process 12/2/2020 9:17:31 AM 13948 (0x367C)
[Installation] :: Executing [C:\WINDOWS\System32\msiexec.exe /i “C:\Windows\ccmcache\Toolkit\Files\ArcGISPro.msi” REBOOT=ReallySuppress /QB-! /L*v “C:\WINDOWS\Logs\Software\ArcGISPro_Install.log”]… Execute-Process 12/2/2020 9:17:31 AM 13948 (0x367C)

As you see, it does not apply the parameters and just run the msi.

If you do not set up the $app variables inside Deploy-Application.ps1 then the script thinks this is a Zero Config MSI install and just looks into the Files folder for msi files and installs them with default parameters.

1 Like

Think I found a bug…
-Timeout does not seem to work for Show-InstallationPrompt.

That has already been reported and will be fixed in the next version:
Show-InstallationPrompt -> Parameter Timeout works in Ver. 3.8.2 but not in 3.8.3 · Issue #592 · PSAppDeployToolkit/PSAppDeployToolkit (github.com)