I have a deployment type with the following attributes:
Technology: MSI
Installation behavior: Install for system
Logon requirement: Whether or not a user is logged on
Installation program visibility: Hidden
When msiexec
is run by the the client, the following entry is shown in AppEnforce.log:
Executing Command line: "C:\WINDOWS\system32\msiexec.exe" /i "AppleApplicationSupport.msi" /qn with user context
This is strange since I've selected "Install for system".
Googling reveals some speculation that the logging is incorrect:
for what it's worth, ive noticed that the appenforce.log seems to always say its in the user context, even when it isnt.
I found some other similar comments, but did not find any definitive reference. This leaves me with the following questions:
Does AppEnforce.log really log the context as user even when it is executed as the system?
TL;DR: AppEnforce.log indeed logs the context incorrectly (at least for "Script Installer" technology).
The Test
I created a deployment type with the following attributes:
Install-Application.ps1
creates a log file calledscript-install-test-YYYY-MM-DD__HH-MM-SS.log
. That script is at the end of this post.I then deployed that deployment type and watched
AppEnforce.log
andscript-install-test-X.log
.Results
I found the following entry in
AppEnforce.log
:Within seconds after that, the
script-install-test-X.log
was written to folderscript-install-test-SYSTEM
. TheSYSTEM
suffix indicates that the script was run as SYSTEM.Conclusion
For "script installer" technology, the context written to
AppEnforce.log
messages of the stylemay incorrectly be written as "user context" even when the command line is executed as system context.
What about MSI Installer Technology?
I did not perform the test for MSI Installer Technology. However, given that the context is sometimes wrong for Script Installer Technology, the context written to
AppEnforce.log
should probably be regarded as unreliable for all deployment types regardless of technology.Install-Application.ps1