To test that an application is 99.9% sure to work when deployed via ConfigMgr it is important to initially test installers by running them in the SYSTEM context on a test machine.
Applications and Packages run under the SYSTEM context when deployed via ConfigMgr and can behave differently when compared to running them as a Local Administrator account or a standard user.
Testing them with PsExec (from the Microsoft PSTools suite – part of Microsoft Sysinternals) means that you can be pretty sure that they will work once you’ve added them into ConfigMgr but saves you time before you create the package/application, distribute the content and test in a deployment etc. only to find it fails and have to start over again.
Running the command below from an ‘Administrator’ command prompt will mimic the ConfigMgr deployment by running any commands issued in the resulting Command Prompt as the LOCAL SYSTEM account:
psexec -s -i cmd.exe
You’ll know that the command prompt is running as SYSTEM by running ‘whoami’ as per the screenshot below:

Once tested in this way, you can go ahead and add your package or application into ConfigMgr and be confident that any deployments to clients via Software Distribution or Task Sequence will be successful.
/ JC


