Troubleshooting with System Context

When creating a Program for a Package, there are essentially two Environment options for how the Program run – with the user’s rights, or with administrative rights.  Using administrative rights will cause the program to run the command line under system context (svchost). 

I recently needed to test an install (when running under system context and when running from the SCCM server) as I was unable to visually see the behavior first hand (e.g. errors).  To do this type of testing, follow these simple instructions.

  1. Log in to Windows with an account that has admin privileges
  2. Launch cmd.exe
  3. Enter “time” and get the value. 
  4. Enter “at time+1min /i cmd” – this will open another command prompt at that time
    For example, if the time is 14:18, the value time+1min will be 14:19
  5. Once the next command prompt opens, you’ll notice that process listed in the title bar is ”svchost.exe”
  6. Enter “net use z: \\servername\share”
  7. Enter credentials that have access to the share, such as your own
  8. Then change to new driver letter and then to the directory.  From there you can launch whatever .exe, .msi, script, etc, that you need visually see.

I used this process to confirm that executables and .msi files were being blocked with an Open File – Security Warning when running from a server share.

About these ads
  1. #1 by Nicolas Moseley on August 25, 2010 - 10:32 am

    John Marcum has an easier alternative to testing in system context (using PSExec.) Check it out! – http://myitforum.com/cs2/blogs/jmarcum/archive/2010/08/25/150872.aspx

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 59 other followers

%d bloggers like this: