CopyProfile causes search shortcuts on all users search screen to point to the default user profile

So, I'm sysprepping Windows 8.1 with an answer file set to CopyProfile=True.  I log in to my customized account and sysprep /generalize /oobe /shutdown /unattend:unattend.xml.  Everything copies over just fine.  I get my layout in the Metro start menu, etc, etc...


However, when I log in to the default profile I originally customized after sysprep, everything works great.  But when I log into any other account created during sysprep or thereafter and I hit the windows key and do a search for "Update" - and select "Windows Update"  I get an error:


Title: C:\Users\ORIGINALDEFAULTACCOUNT\AppData\Local\Packages\windows.immersivecontrol.....

Message: "Windows cannot access the specified device, path, or file.  You may not have the appropriate permissions to access the item."

It's not every single shortcut... Only a certain fiew.
I get a nearly identical message when trying to launch "Programs and Features" from start.  If I manually navigate to these controls, they load up just fine.  Just the search items seem to be pointing to the wrong point.  Is there like a cache that copyprofile seems to be copying over for some reason?

I've tried modifying the built in administrator account thinking Microsoft has gotten a bit stricter on which account I can use, but I get the same error.


Can anybody help?


May 9th, 2014 5:09pm

Hi,

According to this error message, the reasons could be many.

Firstly, run System File Checker tool to check and repair the corrupted file.

And then check if other account have the permission to access this file:

Locate to that file path, find the file, follow this guide to take ownership of this file.

After that, if the issue still doesn't resolve, re-create a new account for test.

Free Windows Admin Tool Kit Click here and download it now
May 12th, 2014 7:46am

Thanks for the response!

I ran SFC and all files come up good.

I know I can take permissions/ownership to access the file, but I'm not sure I would want to do this.

I may not have been clear and perhaps I need to clarify.

Here is my process:

I create account1 prior to sysprepping.  I customize this profile to my liking and copy it over with copyprofile during the sysprep phase.

account1 is now my default profile.

During the sysprep phase I also create account2.  After sysprep completes, when I login to account2 and attempt to access "Programs and Features" or "Windows Update" from metro search, I get the error with the following title: 

C:\Users\account1\AppData\Local\Packages\windows.immersivecontrol

So even though I'm logged into account2, if I do a search and try to run these two shortcuts, they point to a file in account1's profile.

If I create a new profile at this point, the same problem occurs, as account1 is the default profile and it appears that the shortcuts are being carried over as part of the default profile.

Taking ownership/changing permissions of the file/folder does not fix the fact that the shortcuts pointing to the account were copied over the in the first place.  

I could change it so that Everyone has read permissions to this part of the default profiles folder, but I've been lead to believe that this is not best practice.

I've reimaged the computer and started over from scratch, but it appears that the default profile still includes these broken shortcuts.

Perhaps there is a cached search history I need to delete somewhere before sysprepping? 

I also noticed that these "shortcuts" are in a 'packages' folder - are these 'shortcuts' actually windows 8 apps? If so, maybe there's something that's being missed in the provisioning process?

May 12th, 2014 11:46pm

Hi,

I had taken a test on my lab machine. This problem didn't appear as you said.

Thus I suspect your sysprep process is with problem.

please check its log file see if there is any clue:(zip this folder, upload and share to OneDrive)

%WINDIR%\System32\Sysprep\Panther

Meanwhile, I suggest you copy profile in OOBE process for test.

Free Windows Admin Tool Kit Click here and download it now
May 16th, 2014 9:10am

Hi,

Was your issue resolved?

If yes, we will archive this thread temporarily.

If no, please reply and tell us the current situation.

If you have any other question, feel free to contact us. We will try our best to help you.

May 19th, 2014 1:49am

Ok.  So.... after updating the image as of yesterday, this issue has disappeared.  Same image.  Haven't done anything differently.

I can actually use my base image, not run updates and replicate the error, but updates between the last time I ran updates (couldn't have been more than two weeks ago) and yesterday, the issue has disappeared. 

Thank you MS!

Free Windows Admin Tool Kit Click here and download it now
May 20th, 2014 4:13pm

Unfortunately, I have the same problem with my new image as of today. Search for defrag in metro and it tries to launch c:\USers\Administrator\packages etc. Administrator is the user I created the profile with and then used copyprofile
May 21st, 2014 4:58pm

HA,

I've fixed this problem and can explain why it happens, and why it worked for you second time round.

I wondered why it was only SOME of the shortcuts that didn't work properly.  In my case it was "Defragment and Optimize your drives" that was pointing to Administrator even when logged on as a different user.

I do USE this shortcut when preparing my image, and it is somehow caching the link.

The fix.............

Before you reseal your image, go to PC Settings, Search and Apps, Clear Search History.

FIXED!  This even works for profiles that already have the problem.

CopyProfile in sysprep should be updated to do this automatically IMHO.

  • Proposed as answer by alanplum Thursday, May 22, 2014 1:49 PM
Free Windows Admin Tool Kit Click here and download it now
May 22nd, 2014 1:49pm

I'm going to test this out, but I'm certain you're correct.  I had a suspicion that sysprep was copying over some sort of search cache along with the default profile.

However, I'm certain I ran Windows update (had to in order to get the update that I'm thinking might have resolved the issue) and Programs and Features from the default profile when I last updated my image, and after sysprepping, the issue disappeared.

May 23rd, 2014 5:37pm

Hi All,

I know this is a Windows 8 forum, but I have the same issue arising from the Windows 2012r2 image, however, I can't seem to see a simply way to clear the search history as mentioned above. Is there another way to do this in 2012?

The PC Setting App is not installed by default in 2012, and I would rather not install if possible, but I can't see another way to initiate the clear history or re-index.

Cheers

Free Windows Admin Tool Kit Click here and download it now
January 19th, 2015 12:47pm

Hi Chris,

I had the same issue. Turns out the history file is stored here:

C:\Users\<USERNAME>\AppData\Local\Microsoft\Windows\ConnectedSearch\History

So if you've already sysprepped, clear that on the new user's profile.

If you haven't sysprepped yet, clear that before sysprepping.

Hope that helps!

March 15th, 2015 7:12pm

This was a life saver!  PC Setting would flash and disappear.  Having the path to clear worked right away.  Thanks for the post.
Free Windows Admin Tool Kit Click here and download it now
July 21st, 2015 4:12pm

To automate this, I'm running the following command before starting SysPrep:

PowerShell "get-childitem """$env:LOCALAPPDATA\Microsoft\Windows\ConnectedSearch\History""" -recurse | remove-item -Force"

September 11th, 2015 11:21am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics