Reinstalling/Reregistering default apps only works for logged in user

  1. Jayeye's Avatar
    Posts : 2
    Win10 x64
       #1

    Reinstalling/Reregistering default apps only works for logged in user


    Hello and good day everyone reading this

    I have been struggling for some time now with the reinstallation of standard Windows 10 applications for all users. This is done using Powershell with local administrator rights and the following code:

    Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}

    The repair works perfectly for the user who is logged in and executes the code - no reboot necessary. However, all other accounts on the device still have corrupted standard applications, even after a reboot. Only one user is logged on at a time, Powershell is generally run with administrative privileges.

    I have done some test runs with "User A" (local administrator) and "User B" (end user without administrative rights).

    1. default applications of User A are corrupted
    2. user A logs in to Windows
    3. user A starts Powershell with administrative rights
    4. user A enters the above code
    5. default applications of User A are working again

    1. default applications of user B are damaged
    2. user B logs out, user A logs in to Windows
    3. user A starts Powershell with administrative rights
    4. user A enters the above code
    5. user A logs out or restarts the device, user B logs in to Windows
    6. standard applications of User B still do not work

    1. default applications of user B are damaged
    2. user B logs in to Windows
    3. powershell is started with administrative rights and authenticated with User A.
    4. user A enters the above code
    5. default applications of User B still do not work (even after a reboot)

    The "damage" is the same for both users. If User B's account is temporarily raised to the level of a local administrator, User B can successfully repair his own applications using Powershell - similar to the first test case of User A.
    However, this procedure is not desirable. Apart from additional time, User B must be present or provide his personal password. Furthermore it is a matter of time until a downgrade of user B to a non-administrator account is forgotten...

    It was my expectation and wish that a repair with the parameter "-AllUsers" would repair the default applications of all local accounts - do I get the parameter wrong?

    More information:
    - Windows 10 x64, Winver 1909
    - "Damage" is provoked by deleting, renaming or moving the appdata folder of the respective profiles.
    - Background: Renaming the Appdata folder was a very (!) popular method in the times of Windows 7 to quickly fix all kinds of problems without concrete error messages and without having to reset the local account entirely. Unwanted effects could be revised by moving specific folders from the "old" Appdata back to the new Appdata folder. If necessary, the whole process could be undone.
    Since Windows 10, however, several standard applications (Photos, Calculator) are damaged during this process.


    Can anyone provide any help or further insight in this matter?


    I thank you in Advance and remain with best reagards
    Last edited by Jayeye; 11 Feb 2020 at 09:03. Reason: Decent Human being do say Hello :)
      My Computer

  2. Samuria's Avatar
    Posts : 6,049
    windows 10
       #2

    Run it as system schedule task
      My Computer

  3. Jayeye's Avatar
    Posts : 2
    Win10 x64
    Thread Starter
       #3

    Thank you Samuria for your input!

    I must confess that so far I failed to even get this script running via Scheduler, including the "Run with highest privileges" option as well as "Configure for Windows 10" option.
    My plan was to test this out and report back soon, since however all I managed to get was a scheduled task running endlesslesly (and unsuccessfully) reporting back might take another while.

    Unlike last week, I should find some time to hopefully get this to work this week. Until then, please
    take notice that this remains work in progress and your hint is very much appreciated!
      My Computer

  4. FreeBooter's Avatar
    Posts : 3,987
    Windows 10 Pro 64-bit
       #4
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 22:26.
Find Us




Windows 10 Forums