Set-ActiveSetup Failed after update to 3.8.4

After I upgraded to 3.8.4, Set-ActiveSetup failed when running the script through Intune, but when I run i manuelt it works. I have no problem when running 3.8.2. It also works, if i set ExecuteForCurrentUser = $false, but i want the ActiveSetup to run :slight_smile:

Commando:
Set-ActiveSetup -StubExePath "$envWinDir\System32\WindowsPowerShell\v1.0\powershell.exe" -Description $installTitle -Key $installName -Arguments "-NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File "$sDestinationFolder\CurrentUserScript.ps1"" -ExecuteForCurrentUser $true

Error:

[Post-Installation] :: Failed to set Active Setup registry entry. 
Error Record:
-------------At C:\Windows\IMECache\*************************************\AppDeployToolkit\AppDeployToolkitMain.ps1:10768 char:58
+ ... et-RegistryKey -Key $HKCUActiveSetupKey -SID $UserProfile.SID -Value  ...
+                                                  ~~~~~~~~~~~~~~~~
Error Inner Exception(s):
-------------------------	Set-ActiveSetup	02-02-2021 10:45:00	7436 (0x1D0C)

Please use the button </> or Preformatted Text when posting code and logs.

Changed :slight_smile:

That log does not specify what error actually occurred. Why is most of the log missing?
We cannot help you without enough information.

Thought it was enough to see where it went wrong :slight_smile:
But here is the whole log.

<![LOG[[Initialization] :: *******************************************************************************]LOG]!><time="10:44:42.12760" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: *******************************************************************************]LOG]!><time="10:44:42.12760" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: [ComArchive_ComArchive_3.25.29_x64_DA_01] setup started.]LOG]!><time="10:44:42.19060" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: Script [C:\Windows\IMECache\4e0ba4b8-11b1-4d63-9fe8-6ca69337975a_3\AppDeployToolkit\AppDeployToolkitMain.ps1] dot-source invoked by [C:\Windows\IMECache\4e0ba4b8-11b1-4d63-9fe8-6ca69337975a_3\Deploy-Application.ps1]]LOG]!><time="10:44:42.26860" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: Script [C:\Windows\IMECache\4e0ba4b8-11b1-4d63-9fe8-6ca69337975a_3\AppDeployToolkit\AppDeployToolkitExtensions.ps1] dot-source invoked by [C:\Windows\IMECache\4e0ba4b8-11b1-4d63-9fe8-6ca69337975a_3\AppDeployToolkit\AppDeployToolkitMain.ps1]]LOG]!><time="10:44:42.29460" date="02-02-2021" component="PSAppDeployToolkitExt" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitExtensions.ps1">
<![LOG[[Initialization] :: [ComArchive_ComArchive_3.25.29_x64_DA_01] script version is [1.0.0]]LOG]!><time="10:44:42.31260" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: [ComArchive_ComArchive_3.25.29_x64_DA_01] script date is [01/02/2021]]LOG]!><time="10:44:42.31760" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: [ComArchive_ComArchive_3.25.29_x64_DA_01] script author is [Clahs]]LOG]!><time="10:44:42.32160" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: [Deploy Application] script version is [3.8.4]]LOG]!><time="10:44:42.32160" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: The following non-default parameters were passed to [Deploy Application]: [-DeploymentType "Install" -DeployMode "NonInteractive"]]LOG]!><time="10:44:42.32160" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: [App Deploy Toolkit Main] script version is [3.8.4]]LOG]!><time="10:44:42.33760" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: [App Deploy Toolkit Extensions] version is [3.8.4]]LOG]!><time="10:44:42.33760" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: Computer Name is [MyComputer.MyDomain.int]]LOG]!><time="10:44:42.33760" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: Current User is [NT AUTHORITY\SYSTEM]]LOG]!><time="10:44:42.35260" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: OS Version is [Microsoft Windows 10 Education 64-bit 10.0.19042.630]]LOG]!><time="10:44:42.35260" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: OS Type is [Workstation]]LOG]!><time="10:44:42.35260" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: Current Culture is [da-DK], language is [DA] and UI language is [DA]]LOG]!><time="10:44:42.36960" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: Hardware Platform is [Virtual:VMWare]]LOG]!><time="10:44:42.46360" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: PowerShell Host is [ConsoleHost] with version [5.1.19041.610]]LOG]!><time="10:44:42.46360" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: PowerShell Version is [5.1.19041.610 x64]]LOG]!><time="10:44:42.47760" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: PowerShell CLR (.NET) version is [4.0.30319.42000]]LOG]!><time="10:44:42.47760" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: *******************************************************************************]LOG]!><time="10:44:42.47760" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: Display session information for all logged on users: 


NTAccount           : MyDomain\MyUser
SID                 : S-1-5-21-1019272188-1535311337-3350642648-3207
UserName            : MyUser
DomainName          : MyDomain
SessionId           : 2
SessionName         : Console
ConnectState        : Active
IsCurrentSession    : False
IsConsoleSession    : True
IsActiveUserSession : True
IsUserSession       : True
IsRdpSession        : False
IsLocalAdmin        : False
LogonTime           : 02-02-2021 10:39:07
IdleTime            : 00:00:00
DisconnectTime      : 
ClientName          : 
ClientProtocolType  : 
ClientDirectory     : 
ClientBuildNumber   : 0



]LOG]!><time="10:44:42.72760" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: The following users are logged on to the system: [MyDomain\MyUser].]LOG]!><time="10:44:42.72760" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: Current process is running under a system account [NT AUTHORITY\SYSTEM].]LOG]!><time="10:44:42.72760" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: The following user is the console user [MyDomain\MyUser] (user with control of physical monitor, keyboard, and mouse).]LOG]!><time="10:44:42.74360" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: The active logged on user is [MyDomain\MyUser].]LOG]!><time="10:44:42.74360" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: The active logged on user [MyDomain\MyUser] has a primary UI language of [DA].]LOG]!><time="10:44:42.74360" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: The following UI messages were imported from the config XML file: [UI_Messages_DA].]LOG]!><time="10:44:42.75960" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: The active logged on user [MyDomain\MyUser] has a DPI scale factor of [100] with DPI pixels [96].]LOG]!><time="10:44:42.75960" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: Unable to load COM Object [Microsoft.SMS.TSEnvironment]. Therefore, script is not currently running from a SCCM Task Sequence.]LOG]!><time="10:44:42.77560" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: Service [Schedule] exists.]LOG]!><time="10:44:43.06560" date="02-02-2021" component="Test-ServiceExists" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: Get the service [Schedule] startup mode.]LOG]!><time="10:44:43.08160" date="02-02-2021" component="Get-ServiceStartMode" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: Service [Schedule] startup mode is set to [Automatic].]LOG]!><time="10:44:43.22260" date="02-02-2021" component="Get-ServiceStartMode" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: Get the service object for service [Schedule].]LOG]!><time="10:44:43.33160" date="02-02-2021" component="Start-ServiceAndDependencies" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: Service [Schedule] with display name [Opgavestyring] has a status of [Running].]LOG]!><time="10:44:43.35360" date="02-02-2021" component="Start-ServiceAndDependencies" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: The task scheduler service is in a healthy state: True.]LOG]!><time="10:44:43.36160" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: Session 0 detected but deployment mode was manually set to [NonInteractive].]LOG]!><time="10:44:43.36460" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: Installation is running in [NonInteractive] mode.]LOG]!><time="10:44:43.36860" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: Deployment type is [Installation].]LOG]!><time="10:44:43.37260" date="02-02-2021" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="AppDeployToolkitMain.ps1">
<![LOG[[Pre-Installation] :: Evaluate disk space requirements.]LOG]!><time="10:44:43.38960" date="02-02-2021" component="Show-InstallationWelcome" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Pre-Installation] :: Retrieve free disk space for drive [C:].]LOG]!><time="10:44:43.40660" date="02-02-2021" component="Get-FreeDiskSpace" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Pre-Installation] :: Free disk space for drive [C:]: [89457 MB].]LOG]!><time="10:44:43.42160" date="02-02-2021" component="Get-FreeDiskSpace" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Pre-Installation] :: Successfully passed minimum disk space requirement check.]LOG]!><time="10:44:43.45360" date="02-02-2021" component="Show-InstallationWelcome" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Pre-Installation] :: Get deferral history...]LOG]!><time="10:44:43.45360" date="02-02-2021" component="Get-DeferHistory" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Pre-Installation] :: Registry key [Registry::HKEY_LOCAL_MACHINE\SOFTWARE\PSAppDeployToolkit\DeferHistory\ComArchive_ComArchive_3.25.29_x64_DA_01] does not exist. Return $null.]LOG]!><time="10:44:43.46860" date="02-02-2021" component="Get-RegistryKey" context="NT AUTHORITY\SYSTEM" type="2" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Pre-Installation] :: User has [2] deferrals remaining.]LOG]!><time="10:44:43.46860" date="02-02-2021" component="Show-InstallationWelcome" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Pre-Installation] :: Check for running applications: [outlook]]LOG]!><time="10:44:43.49960" date="02-02-2021" component="Get-RunningProcesses" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Pre-Installation] :: Specified applications are not running.]LOG]!><time="10:44:43.53060" date="02-02-2021" component="Get-RunningProcesses" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Pre-Installation] :: Bypassing Show-InstallationProgress [Mode: NonInteractive]. Status message:Installation i gang. Vent venligst...]LOG]!><time="10:44:43.57760" date="02-02-2021" component="Show-InstallationProgress" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Pre-Installation] :: Get information for installed Application Name(s) [ComArchive]...]LOG]!><time="10:44:43.60860" date="02-02-2021" component="Get-InstalledApplication" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Pre-Installation] :: Skipped 36 entries while searching, because they were considered Microsoft updates.]LOG]!><time="10:44:43.74960" date="02-02-2021" component="Get-InstalledApplication" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Pre-Installation] :: Found no application based on the supplied parameters.]LOG]!><time="10:44:43.76560" date="02-02-2021" component="Get-InstalledApplication" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Pre-Installation] :: Found [0] application(s) that matched the specified criteria [ComArchive].]LOG]!><time="10:44:43.76560" date="02-02-2021" component="Remove-MSIApplications" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Pre-Installation] :: No applications found for removal. Continue...]LOG]!><time="10:44:43.78060" date="02-02-2021" component="Remove-MSIApplications" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Pre-Installation] :: [C:\Windows\IMECache\4e0ba4b8-11b1-4d63-9fe8-6ca69337975a_3\SupportFiles\dotNetFx40_Full_x86_x64-DK.exe] is a valid fully qualified path, continue.]LOG]!><time="10:44:43.81260" date="02-02-2021" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Pre-Installation] :: Working Directory is [C:\Windows\IMECache\4e0ba4b8-11b1-4d63-9fe8-6ca69337975a_3\SupportFiles].]LOG]!><time="10:44:43.84360" date="02-02-2021" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Pre-Installation] :: Executing [C:\Windows\IMECache\4e0ba4b8-11b1-4d63-9fe8-6ca69337975a_3\SupportFiles\dotNetFx40_Full_x86_x64-DK.exe /q /norestart]...]LOG]!><time="10:44:43.85960" date="02-02-2021" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Pre-Installation] :: Execution completed successfully with exit code [0].]LOG]!><time="10:44:58.41060" date="02-02-2021" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Pre-Installation] :: Read data from Windows Installer database file [C:\Windows\IMECache\4e0ba4b8-11b1-4d63-9fe8-6ca69337975a_3\SupportFiles\VisualStudio2010ToolsforOffice-x64-DK\vstor40_x64.msi] in table [Property].]LOG]!><time="10:44:58.44260" date="02-02-2021" component="Get-MsiTableProperty" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Pre-Installation] :: Get information for installed Product Code [{BD430C50-784F-32CD-87E7-A8C47EE6107F}]...]LOG]!><time="10:44:58.62960" date="02-02-2021" component="Get-InstalledApplication" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Pre-Installation] :: Found installed application [Microsoft Visual Studio 2010 Tools for Office Runtime (x64)] version [10.0.30322] matching product code [{BD430C50-784F-32CD-87E7-A8C47EE6107F}].]LOG]!><time="10:44:58.73660" date="02-02-2021" component="Get-InstalledApplication" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Pre-Installation] :: Skipped 36 entries while searching, because they were considered Microsoft updates.]LOG]!><time="10:44:58.74560" date="02-02-2021" component="Get-InstalledApplication" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Pre-Installation] :: The MSI is already installed on this system. Skipping action [Install]...]LOG]!><time="10:44:58.74560" date="02-02-2021" component="Execute-MSI" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Installation] :: Running setup for 32bit Office]LOG]!><time="10:44:58.74560" date="02-02-2021" component="Installation" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Installation] :: Read data from Windows Installer database file [C:\Windows\IMECache\4e0ba4b8-11b1-4d63-9fe8-6ca69337975a_3\Files\ComArchive for Outlook 2010-13-16 x86 (3.25.29).msi] in table [Property].]LOG]!><time="10:44:58.76160" date="02-02-2021" component="Get-MsiTableProperty" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Installation] :: Get information for installed Product Code [{3AAE505B-D70D-47E9-9644-A175221ABF1C}]...]LOG]!><time="10:44:58.87160" date="02-02-2021" component="Get-InstalledApplication" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Installation] :: Skipped 36 entries while searching, because they were considered Microsoft updates.]LOG]!><time="10:44:58.96460" date="02-02-2021" component="Get-InstalledApplication" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Installation] :: Found no application based on the supplied parameters.]LOG]!><time="10:44:58.96460" date="02-02-2021" component="Get-InstalledApplication" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Installation] :: Executing MSI action [Install]...]LOG]!><time="10:44:58.96460" date="02-02-2021" component="Execute-MSI" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Installation] :: [C:\Windows\System32\msiexec.exe] is a valid fully qualified path, continue.]LOG]!><time="10:44:58.98060" date="02-02-2021" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Installation] :: Check to see if mutex [Global\_MSIExecute] is available. Wait up to [10 minute(s)] for the mutex to become available.]LOG]!><time="10:44:59.02760" date="02-02-2021" component="Test-IsMutexAvailable" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Installation] :: Mutex [Global\_MSIExecute] is available for an exclusive lock.]LOG]!><time="10:44:59.04260" date="02-02-2021" component="Test-IsMutexAvailable" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Installation] :: Working Directory is [C:\Windows\IMECache\4e0ba4b8-11b1-4d63-9fe8-6ca69337975a_3\Files].]LOG]!><time="10:45:00.08360" date="02-02-2021" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Installation] :: Executing [C:\Windows\System32\msiexec.exe /i "C:\Windows\IMECache\4e0ba4b8-11b1-4d63-9fe8-6ca69337975a_3\Files\ComArchive for Outlook 2010-13-16 x86 (3.25.29).msi" REBOOT=REALLYSUPPRESS ALLUSERS=2 /QN /L*v "C:\Windows\Logs\Software\ComArchive for Outlook 2010-13-16 x86 (3.25.29)_Install.log"]...]LOG]!><time="10:45:00.08360" date="02-02-2021" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Installation] :: Execution completed successfully with exit code [0].]LOG]!><time="10:45:00.70460" date="02-02-2021" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Installation] :: Refresh the Desktop and the Windows Explorer environment process block.]LOG]!><time="10:45:00.72060" date="02-02-2021" component="Update-Desktop" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Check for ActiveSetup ComArchive_ComArchive_3.25.29_x64_DA_01]LOG]!><time="10:45:00.72060" date="02-02-2021" component="ActiveSetup" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Active Setup is not found.]LOG]!><time="10:45:00.73660" date="02-02-2021" component="ActiveSetup" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Check for old files to ActiveSetup]LOG]!><time="10:45:00.75260" date="02-02-2021" component="ActiveSetup" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Removing old files.]LOG]!><time="10:45:00.75260" date="02-02-2021" component="ActiveSetup" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Copy folder C:\Windows\IMECache\4e0ba4b8-11b1-4d63-9fe8-6ca69337975a_3\SupportFiles\ActiveSetup to C:\ProgramData\Skolen\ActiveSetup\ComArchive_ComArchive_3.25.29_x64_DA_01]LOG]!><time="10:45:00.76760" date="02-02-2021" component="ActiveSetup" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Install ActiveSetup ComArchive_ComArchive_3.25.29_x64_DA_01]LOG]!><time="10:45:00.76760" date="02-02-2021" component="ActiveSetup" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Adding Active Setup Key for local machine: [Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01].]LOG]!><time="10:45:00.78360" date="02-02-2021" component="Set-ActiveSetup" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Create registry key [Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01].]LOG]!><time="10:45:00.79860" date="02-02-2021" component="Set-RegistryKey" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Set registry key value: [Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01] [(Default) = ComArchive ComArchive 3.25.29].]LOG]!><time="10:45:00.81460" date="02-02-2021" component="Set-RegistryKey" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Set registry key value: [Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01] [StubPath = C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File "C:\ProgramData\Skolen\ActiveSetup\ComArchive_ComArchive_3.25.29_x64_DA_01\CurrentUserScript.ps1"].]LOG]!><time="10:45:00.83660" date="02-02-2021" component="Set-RegistryKey" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Set registry key value: [Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01] [Version = 2102,0210,4500].]LOG]!><time="10:45:00.84560" date="02-02-2021" component="Set-RegistryKey" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Set registry key value: [Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01] [IsInstalled = 1].]LOG]!><time="10:45:00.85660" date="02-02-2021" component="Set-RegistryKey" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Failed to set Active Setup registry entry. 
Error Record:
-------------At C:\Windows\IMECache\4e0ba4b8-11b1-4d63-9fe8-6ca69337975a_3\AppDeployToolkit\AppDeployToolkitMain.ps1:10768 char:58
+ ... et-RegistryKey -Key $HKCUActiveSetupKey -SID $UserProfile.SID -Value  ...
+                                                  ~~~~~~~~~~~~~~~~
Error Inner Exception(s):
-------------------------]LOG]!><time="10:45:00.90660" date="02-02-2021" component="Set-ActiveSetup" context="NT AUTHORITY\SYSTEM" type="3" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Bypassing Close-InstallationProgress [Mode: NonInteractive]]LOG]!><time="10:45:00.93860" date="02-02-2021" component="Close-InstallationProgress" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: ComArchive_ComArchive_3.25.29_x64_DA_01 Installation completed with exit code [0].]LOG]!><time="10:45:00.95360" date="02-02-2021" component="Exit-Script" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: -------------------------------------------------------------------------------]LOG]!><time="10:45:00.95360" date="02-02-2021" component="Exit-Script" context="NT AUTHORITY\SYSTEM" type="1" thread="7436" file="Deploy-Application.ps1">

This log does not specify an error related to -ExecuteForCurrentUser
If fails right before it.

If I ran the script manually, then it works as I said, and here, according to the log here, it starts with the part -ExecuteForCurrentUser has to perform, where it fails if run through Intune

3.8.4 Manuelt:

<![LOG[[Post-Installation] :: Adding Active Setup Key for local machine: [Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01].]LOG]!><time="00:55:13.37860" date="02-03-2021" component="Set-ActiveSetup" context="MyDomain\MyUser" type="1" thread="9708" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Create registry key [Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01].]LOG]!><time="00:55:13.40760" date="02-03-2021" component="Set-RegistryKey" context="MyDomain\MyUser" type="1" thread="9708" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Set registry key value: [Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01] [(Default) = ComArchive ComArchive 3.25.29].]LOG]!><time="00:55:13.42260" date="02-03-2021" component="Set-RegistryKey" context="MyDomain\MyUser" type="1" thread="9708" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Set registry key value: [Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01] [StubPath = C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File "C:\ProgramData\Skolen\ActiveSetup\ComArchive_ComArchive_3.25.29_x64_DA_01\CurrentUserScript.ps1"].]LOG]!><time="00:55:13.43660" date="02-03-2021" component="Set-RegistryKey" context="MyDomain\MyUser" type="1" thread="9708" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Set registry key value: [Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01] [Version = 2102,0300,5513].]LOG]!><time="00:55:13.44060" date="02-03-2021" component="Set-RegistryKey" context="MyDomain\MyUser" type="1" thread="9708" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Set registry key value: [Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01] [IsInstalled = 1].]LOG]!><time="00:55:13.45660" date="02-03-2021" component="Set-RegistryKey" context="MyDomain\MyUser" type="1" thread="9708" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Registry key [Registry::HKEY_CURRENT_USER\Software\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01] does not exist. Return $null.]LOG]!><time="00:55:13.45660" date="02-03-2021" component="Get-RegistryKey" context="MyDomain\MyUser" type="2" thread="9708" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Executing Active Setup StubPath file for the current user.]LOG]!><time="00:55:13.47160" date="02-03-2021" component="Set-ActiveSetup" context="MyDomain\MyUser" type="1" thread="9708" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: [C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe] is a valid fully qualified path, continue.]LOG]!><time="00:55:13.47160" date="02-03-2021" component="Execute-Process" context="MyDomain\MyUser" type="1" thread="9708" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Working Directory is [C:\Windows\System32\WindowsPowerShell\v1.0].]LOG]!><time="00:55:13.48860" date="02-03-2021" component="Execute-Process" context="MyDomain\MyUser" type="1" thread="9708" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Executing [C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File "C:\ProgramData\Skolen\ActiveSetup\ComArchive_ComArchive_3.25.29_x64_DA_01\CurrentUserScript.ps1"]...]LOG]!><time="00:55:13.48860" date="02-03-2021" component="Execute-Process" context="MyDomain\MyUser" type="1" thread="9708" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: PassThru parameter specified, returning execution results object.]LOG]!><time="00:55:13.75260" date="02-03-2021" component="Execute-Process" context="MyDomain\MyUser" type="1" thread="9708" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Execution completed successfully with exit code [0].]LOG]!><time="00:55:13.75260" date="02-03-2021" component="Execute-Process" context="MyDomain\MyUser" type="1" thread="9708" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Adding Active Setup Key for the current user: [Registry::HKEY_CURRENT_USER\Software\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01].]LOG]!><time="00:55:13.76860" date="02-03-2021" component="Set-ActiveSetup" context="MyDomain\MyUser" type="1" thread="9708" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Create registry key [Registry::HKEY_CURRENT_USER\Software\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01].]LOG]!><time="00:55:13.76860" date="02-03-2021" component="Set-RegistryKey" context="MyDomain\MyUser" type="1" thread="9708" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Set registry key value: [Registry::HKEY_CURRENT_USER\Software\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01] [(Default) = ComArchive ComArchive 3.25.29].]LOG]!><time="00:55:13.78460" date="02-03-2021" component="Set-RegistryKey" context="MyDomain\MyUser" type="1" thread="9708" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Set registry key value: [Registry::HKEY_CURRENT_USER\Software\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01] [StubPath = C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File "C:\ProgramData\Skolen\ActiveSetup\ComArchive_ComArchive_3.25.29_x64_DA_01\CurrentUserScript.ps1"].]LOG]!><time="00:55:13.78460" date="02-03-2021" component="Set-RegistryKey" context="MyDomain\MyUser" type="1" thread="9708" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Set registry key value: [Registry::HKEY_CURRENT_USER\Software\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01] [Version = 2102,0300,5513].]LOG]!><time="00:55:13.79960" date="02-03-2021" component="Set-RegistryKey" context="MyDomain\MyUser" type="1" thread="9708" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Set registry key value: [Registry::HKEY_CURRENT_USER\Software\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01] [IsInstalled = 1].]LOG]!><time="00:55:13.81660" date="02-03-2021" component="Set-RegistryKey" context="MyDomain\MyUser" type="1" thread="9708" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Bypassing Close-InstallationProgress [Mode: NonInteractive]]LOG]!><time="00:55:13.83160" date="02-03-2021" component="Close-InstallationProgress" context="MyDomain\MyUser" type="1" thread="9708" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: ComArchive_ComArchive_3.25.29_x64_DA_01 Installation completed with exit code [0].]LOG]!><time="00:55:13.84760" date="02-03-2021" component="Exit-Script" context="MyDomain\MyUser" type="1" thread="9708" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: -------------------------------------------------------------------------------]LOG]!><time="00:55:13.84760" date="02-03-2021" component="Exit-Script" context="MyDomain\MyUser" type="1" thread="9708" file="Deploy-Application.ps1">

And if I run the same script through Intune, where the kit is downgraded to 3.8.2, there is no problem either.

Log from 3.8.2 through Inune:

<![LOG[[Post-Installation] :: Install ActiveSetup ComArchive_ComArchive_3.25.29_x64_DA_01]LOG]!><time="01:10:32.86660" date="02-03-2021" component="ActiveSetup" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Return fully qualified registry key path [Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01].]LOG]!><time="01:10:32.88260" date="02-03-2021" component="Convert-RegistryPath" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Create registry key [Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01].]LOG]!><time="01:10:32.89860" date="02-03-2021" component="Set-RegistryKey" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Set registry key value: [Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01] [(Default) = ComArchive ComArchive 3.25.29].]LOG]!><time="01:10:32.89860" date="02-03-2021" component="Set-RegistryKey" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Return fully qualified registry key path [Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01].]LOG]!><time="01:10:32.91360" date="02-03-2021" component="Convert-RegistryPath" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Set registry key value: [Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01] [StubPath = C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File "C:\ProgramData\Skolen\ActiveSetup\ComArchive_ComArchive_3.25.29_x64_DA_01\CurrentUserScript.ps1"].]LOG]!><time="01:10:32.93160" date="02-03-2021" component="Set-RegistryKey" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Return fully qualified registry key path [Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01].]LOG]!><time="01:10:32.93960" date="02-03-2021" component="Convert-RegistryPath" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Set registry key value: [Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01] [Version = 2102,0301,1032].]LOG]!><time="01:10:32.94460" date="02-03-2021" component="Set-RegistryKey" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Return fully qualified registry key path [Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01].]LOG]!><time="01:10:32.95360" date="02-03-2021" component="Convert-RegistryPath" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Set registry key value: [Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01] [IsInstalled = 1].]LOG]!><time="01:10:32.95860" date="02-03-2021" component="Set-RegistryKey" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Session 0 detected: Execute Active Setup StubPath file for currently logged in user [MyDomain\MyUser].]LOG]!><time="01:10:32.96460" date="02-03-2021" component="Set-ActiveSetup" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Create scheduled task to run the process [wscript.exe "C:\Windows\TEMP\PSAppDeployToolkit\PSAppDeployToolkit-ExecuteAsUser.vbs"] as the logged-on user [MyDomain\MyUser]...]LOG]!><time="01:10:32.99460" date="02-03-2021" component="Execute-ProcessAsUser" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: [C:\Windows\System32\schtasks.exe] is a valid fully qualified path, continue.]LOG]!><time="01:10:32.99460" date="02-03-2021" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Working Directory is [C:\Windows\System32].]LOG]!><time="01:10:33.01060" date="02-03-2021" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Executing [C:\Windows\System32\schtasks.exe /create /f /tn PSAppDeployToolkit-ExecuteAsUser /xml "C:\Windows\TEMP\PSAppDeployToolkit\PSAppDeployToolkit-ExecuteAsUser.xml"]...]LOG]!><time="01:10:33.01060" date="02-03-2021" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: -PassThru parameter specified, returning execution results object.]LOG]!><time="01:10:33.04160" date="02-03-2021" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Execution completed successfully with exit code [0].]LOG]!><time="01:10:33.05760" date="02-03-2021" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Trigger execution of scheduled task with command [wscript.exe "C:\Windows\TEMP\PSAppDeployToolkit\PSAppDeployToolkit-ExecuteAsUser.vbs"] as the logged-on user [MyDomain\MyUser]...]LOG]!><time="01:10:33.05760" date="02-03-2021" component="Execute-ProcessAsUser" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: [C:\Windows\System32\schtasks.exe] is a valid fully qualified path, continue.]LOG]!><time="01:10:33.05760" date="02-03-2021" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Working Directory is [C:\Windows\System32].]LOG]!><time="01:10:33.07360" date="02-03-2021" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Executing [C:\Windows\System32\schtasks.exe /run /i /tn PSAppDeployToolkit-ExecuteAsUser]...]LOG]!><time="01:10:33.07360" date="02-03-2021" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: -PassThru parameter specified, returning execution results object.]LOG]!><time="01:10:33.10460" date="02-03-2021" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Execution completed successfully with exit code [0].]LOG]!><time="01:10:33.12060" date="02-03-2021" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Waiting for the process launched by the scheduled task [PSAppDeployToolkit-ExecuteAsUser] to complete execution (this may take some time)...]LOG]!><time="01:10:33.12060" date="02-03-2021" component="Execute-ProcessAsUser" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Exit code from process launched by scheduled task [0].]LOG]!><time="01:10:34.16460" date="02-03-2021" component="Execute-ProcessAsUser" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Delete scheduled task [PSAppDeployToolkit-ExecuteAsUser].]LOG]!><time="01:10:34.16460" date="02-03-2021" component="Execute-ProcessAsUser" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: [C:\Windows\System32\schtasks.exe] is a valid fully qualified path, continue.]LOG]!><time="01:10:34.18060" date="02-03-2021" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Working Directory is [C:\Windows\System32].]LOG]!><time="01:10:34.18060" date="02-03-2021" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Executing [C:\Windows\System32\schtasks.exe /delete /tn PSAppDeployToolkit-ExecuteAsUser /f]...]LOG]!><time="01:10:34.19660" date="02-03-2021" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Execution completed successfully with exit code [0].]LOG]!><time="01:10:34.22760" date="02-03-2021" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Return fully qualified registry key path [Registry::HKEY_USERS\S-1-5-21-1019272188-1535311337-3350642648-3207\Software\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01].]LOG]!><time="01:10:34.22760" date="02-03-2021" component="Convert-RegistryPath" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Create registry key [Registry::HKEY_USERS\S-1-5-21-1019272188-1535311337-3350642648-3207\Software\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01].]LOG]!><time="01:10:34.24260" date="02-03-2021" component="Set-RegistryKey" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Set registry key value: [Registry::HKEY_USERS\S-1-5-21-1019272188-1535311337-3350642648-3207\Software\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01] [(Default) = ComArchive ComArchive 3.25.29].]LOG]!><time="01:10:34.24260" date="02-03-2021" component="Set-RegistryKey" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Return fully qualified registry key path [Registry::HKEY_USERS\S-1-5-21-1019272188-1535311337-3350642648-3207\Software\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01].]LOG]!><time="01:10:34.25860" date="02-03-2021" component="Convert-RegistryPath" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Set registry key value: [Registry::HKEY_USERS\S-1-5-21-1019272188-1535311337-3350642648-3207\Software\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01] [StubPath = C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File "C:\ProgramData\Skolen\ActiveSetup\ComArchive_ComArchive_3.25.29_x64_DA_01\CurrentUserScript.ps1"].]LOG]!><time="01:10:34.25860" date="02-03-2021" component="Set-RegistryKey" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Return fully qualified registry key path [Registry::HKEY_USERS\S-1-5-21-1019272188-1535311337-3350642648-3207\Software\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01].]LOG]!><time="01:10:34.27460" date="02-03-2021" component="Convert-RegistryPath" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Set registry key value: [Registry::HKEY_USERS\S-1-5-21-1019272188-1535311337-3350642648-3207\Software\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01] [Version = 2102,0301,1032].]LOG]!><time="01:10:34.27460" date="02-03-2021" component="Set-RegistryKey" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Return fully qualified registry key path [Registry::HKEY_USERS\S-1-5-21-1019272188-1535311337-3350642648-3207\Software\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01].]LOG]!><time="01:10:34.28960" date="02-03-2021" component="Convert-RegistryPath" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Set registry key value: [Registry::HKEY_USERS\S-1-5-21-1019272188-1535311337-3350642648-3207\Software\Microsoft\Active Setup\Installed Components\ComArchive_ComArchive_3.25.29_x64_DA_01] [IsInstalled = 1].]LOG]!><time="01:10:34.28960" date="02-03-2021" component="Set-RegistryKey" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: ComArchive_ComArchive_3.25.29_x64_DA_01 Installation completed with exit code [0].]LOG]!><time="01:10:34.32160" date="02-03-2021" component="Exit-Script" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: -------------------------------------------------------------------------------]LOG]!><time="01:10:34.32160" date="02-03-2021" component="Exit-Script" context="NT AUTHORITY\SYSTEM" type="1" thread="8280" file="Deploy-Application.ps1">

If it’s not the part that failed, then where does it fail?

Im working on a fix for this function. It will be released in the next version, this month.

1 Like

Hey there,

i ran into that same exact issue.

The Problem seems to be that “$UserProfile” neither does exists nor does it have a property “SID”.
I think one would use “$RunAsActiveUser” instead of $UserProfile, because $RunAsActiveUser has the property “SID”.
I haven’t tested this in a multi-user environment, but with only one user logged in this fixed the error for me.

Another point i came across is that PSADT only checks for “IsInstalled” -ne 1, but i’d rather prefer to check for the Version, because the version may increase/change :confused:

Kind regards
BaBa

All of this will be addressed in the next version. I already wrote the code.
IsInstalled is not even supposed to be in CURRENT USER active setup. The version will be compared.

2 Likes

@luki1412 - is the fix included in the 3.8.5 release?

Thanks for a great tool!