Monthly Archives: September 2011

Error (TakeOwnerAndDeleteKey) generated when creating a mandatory profile

Just a quick post, but I recently came across the below error while generating a mandatory profile and went about investing some time with Microsoft.

Before I go further, do you know how the correct procedure to create a mandatory profile in server 2008 R2? Are you sure? Because this hidden / badly documented article tucked away on Technet was news to me!

Now that that’s out of the way, after running the sysprep command and restarting you may receive the following error in the setupact.txt file and wonder, like me if this is something to be worried about.

2011-08-19 14:05:22, Info [Shell Unattend] CopyProfileDirectory from C:UsersAdministrator succeeded.
2011-08-19 14:05:22, Error [Shell Unattend] TakeOwnerAndDeleteKey failed (0x80070002)
2011-08-19 14:05:22, Info [Shell Unattend] CopyProfile succeeded

Fear not, having spoken to Microsoft (ref:111082230465165) this error can occur if the profile is deleted before the process has caught up, resulting in this strange, but harmless error. Your user profile is still a model template to be used as you see fit.

Edit:

For a really good write up on how to create a mandatory profile in server 2008 R2 / Windows 7 head over to myvirtualvision.com by @KBaggerman.

App-V Launcher, an application to quickly troubleshoot in the App-V bubble.

Note: This post has been updated to include an executable for AppV 5 along with the source code if you wish to see how to interact with powershell from .Net.

So here’s your scenario, you’re knee deep in an App-V roll out and a user reports a bizarre issue with a virtual application. You need to get into the bubble to have a look around and the process normally goes something like this:

  • “what’s that command again?”
  • open up a browse and search for it… oh yes, its “sfttray.exe /exe cmd.exe ” and the application name at the end…
  • what’s the application name? oh yes, its a combination of the original application name and the particular version number… “theres no way I can remember that!”
  • launch the sftcmc.msc, and try to find the correct application out of a potentially very long list.
  • copy the name into the command line and pray you don’t close that cmd window soon.

This process always slows me down, so I wrote the following little program to get over this issue, enter App-V Launcher:

This application enumerates cached Microsoft App-V applications and presents you with a list to choose from. Once you select the application you want to work with, you can simply type the executable you need to use inside of the bubble and you can troubleshoot to your hearts content.

Below you’ll find the pre req’s, supported platforms and download. I’ve also included the source code should you need to tweak it to suit your implementation.

I have tested this on:

  • Windows server 2008 r2 with App-V 4.6 sp1
  • Windows server 2003 r2 (x86) with App-V 4.5

Prerequisites:

  • Microsoft .Net framework 3.5 (.Net 4.0 for appv 5 launcher)
Download:

Updated for App-V 5:

I’ve updated the package for app-v 5, cleaner UI and now relies on the powershell commands.

appv5