Leveraging System Context in Windows
I’d like to take things away from App-V for this blog if possible. Give the site a little more variety. I have been working with App-v mainly, however, I have also obviously been involved with MSI packaging and OS migration. With Windows 7, some features have been deprecated and as an IT professional, learning the little nuances in the new platform is part of the challenge and fun!
One of the first walls I ran into, with Windows 7, was met when I was working on a project that required me to perform my test install in system context. The reason why I wanted to do this was to mimic the install in the context it would be deployed in. Previously, when testing on XP, I would have used the ‘At interactive’ method to do this, but this is no more. A colleague of mine actually told me about this nice little tool for launching the command window in System context on Win7. I shall dispense this advice now(Crappy Sunscreen song reference, sorry)
How To Test an application install in the system context mode to mimic Deployment tools
You can open up an entry point in System context by following the below four steps.
Step 1: Run Command Window as Administrator
Step 2: Use psexec.exe
You will need to use the SysInternals Tool ‘psexec.exe’. These tools are a free set of troubleshooting and development tools that can be found on the Microsoft Technet site at the following location: – https://technet.microsoft.com/en-us/sysinternals/default.aspx The Sysinternals tools get updated so you should ensure you have the latest set.
Run the command as seen below (NOTE: Location of your psexec.exe may differ in this case I have copied the psexec.exe to the desktop as illustrated below):
A new CMD window should appear:
Step 3: Verify Context
Close the original cmd window as seen in Figure 2 and check Task Manager (Task Manager can be launched by right-clicking the taskbar and choosing Task Manager)(Explain how you launch task manager) to ensure your command window is now running in System context:
Step 4: Perform Actions
Run your install or do whatever it is that you aim to do in the System Context. This should help you to mimic the customer’s deployment method by installing in the correct context.