I know how Activesetup works, how does the command Execute-MSI -Action 'ActiveSetup' -Path '... work?

According to the code it will launch the MSI with the following MSIEXEC switches: /fups (see msiexec | Microsoft Docs)

It will also create a log file ending with _ActiveSetup.log
My best guess is:
Execute-MSI -Action 'ActiveSetup' -Path 'Install_Me_per_user.msi'

Since $Action is not mentioned in a way that would trigger Set-ActiveSetup from Execute-MSI, my best guess is that it tries to FIX Shortcuts, Files and registry entries for the user running PSADT. I think it’s meant to be used BY Set-ActiveSetup. This however would not work since PSADT no longer works for non-admins. The functionality was broken in the last year or so. ( see Use PSAppDeployToolkit without local administrator - #8 by RaghuKeenLearner)

.
If that is the case, try something like this instead:

[String]$LocalPathToYourMSI = "<some place on the computer that the user can READ>"
Copy-file -Path 'Install_Me_per_user.msi' -Destination $LocalPathToYourMSI -ContinueOnError $false
Set-ActiveSetup -StubExePath "$envSystem32Directory\msiexec.exe" -Arguments "/i `"$LocalPathToYourMSI`" /QN /L*v "%temp%\Install_Me_per_user_MSI_Install.log" " -ContinueOnError $false
1 Like