Skip to content
This repository has been archived by the owner on May 28, 2021. It is now read-only.

Windows Store appllication. #265

Closed
Payasonic opened this issue Sep 18, 2019 · 12 comments
Closed

Windows Store appllication. #265

Payasonic opened this issue Sep 18, 2019 · 12 comments

Comments

@Payasonic
Copy link

Hi there, I used your script and i accidentally deleted WindowsStore, next time i tried to use script with option to install WindowsStore it did nothing.
Any help would be appreciated.

@Disassembler0
Copy link
Owner

I've just tried on VM, to be sure, and it works, provided you didn't forget to include admin elevation and haven't used any other tweaking tools (some of which remove the AppX package completely).

Open regular command line (cmd), navigate to the directory with the script and run

powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0Win10.ps1" -include "%~dp0Win10.psm1" RequireAdmin InstallWindowsStore

If that doesn't work, get an elevated PowerShell (run as admin), run the following and paste all the output here.

Get-AppxPackage -AllUsers "Microsoft.DesktopAppInstaller" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
Get-AppxPackage -AllUsers "Microsoft.Services.Store.Engagement" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
Get-AppxPackage -AllUsers "Microsoft.StorePurchaseApp" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
Get-AppxPackage -AllUsers "Microsoft.WindowsStore" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}

@Payasonic
Copy link
Author

Payasonic commented Sep 18, 2019 via email

@Payasonic
Copy link
Author

Payasonic commented Sep 18, 2019 via email

@Payasonic
Copy link
Author

I have deleted ~dp0 from the Win10 lines and managed to get to powershell message which says installing windows store but i still can't find it.

@Disassembler0
Copy link
Owner

The tweak for Windows Store removal is excluded by default, so if you haven't manually uncommented UninstallWindowsStore in Default.preset, then it wasn't this script what uninstalled Windows Store.

  1. When you say "it did nothing", did it at least briefly show the progress bar on the top of the powershell window? Like this
    store

  2. Try opening Run prompt (either via right-clicking on Start Menu or via Win+R keyboard shortcut) and run

    ms-windows-store:
    

    It should either launch the Store or give you an error message "You'll need a new app to open this ms-windows-store link". Let me know what was the result.

  3. Please run following command from elevated PowerShell and pase the output

    Get-AppxPackage -AllUsers "Microsoft.WindowsStore"
    

@Payasonic
Copy link
Author

Payasonic commented Sep 18, 2019 via email

@Payasonic
Copy link
Author

Payasonic commented Sep 18, 2019

OS Name Microsoft Windows 10 Enterprise LTSC
Version 10.0.17763 Build 17763
dont know if it might be useful.

Might be that i also corrupted my profile.

@Disassembler0
Copy link
Owner

  1. when i run that command it just moves to a new line to type in a command.

Yeah, so this tells us it definitely wasn't caused by the script. Even though there were several attempts (#130, #165, #239, #243) to add tweaks which would uninstall AppX packages for good, your case is the exact reason why I have never added them so far. Because such modifications can't be easily reverted.

There is a rough outline what to do in case something like this happens in my script here:

# In case you have removed them for good, you can try to restore the files using installation medium as follows
# New-Item C:\Mnt -Type Directory | Out-Null
# dism /Mount-Image /ImageFile:D:\sources\install.wim /index:1 /ReadOnly /MountDir:C:\Mnt
# robocopy /S /SEC /R:0 "C:\Mnt\Program Files\WindowsApps" "C:\Program Files\WindowsApps"
# dism /Unmount-Image /Discard /MountDir:C:\Mnt
# Remove-Item -Path C:\Mnt -Recurse

However it requires an installation media and some skills and insight into what you're about to do, because the comments are really just a general guidance.

There's also answered question about the same on superuser.com, but this solution also requires another source of files (another PC or a virtual machine) you need to copy.

@Payasonic
Copy link
Author

Thanks very much for the answer!
I feared it would come to this, I'll see what i can do with this WindowsApps, etc. and hopefully will bring to a working condition again :)

@Payasonic
Copy link
Author

I'm exactly missing Windows Store app in my WindowApps folder.

@Payasonic
Copy link
Author

I managed to get the Windows Store app back with a help of superuser.com and most importantly your help!

Thanks a million!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@Disassembler0 @Payasonic and others