New
#160
Hello Freebooter, thank you for your message, which are the codes you have posted? Do you refer to codes in Option 1/2/3 on page 1 of this thread? How do I execute a file saved as .bat as batch script? And do I do it in Safe Mode?
Sorry, I 've got a lot to learn..
- - - Updated - - -
I should also mention I have tried to execute the code for specific apps as well (not just "all apps / current & all users")... in particular, I have also tried to execute the script for Store and Settings. So, logged in Safe Mode with Network, opened PoweShell as administrator, pasted the script and pressed Enter.
Same error (attached screenshot), though after the error PowerShell asked me to specify a path.
You can double-click the batch script to execute it visit below link. Execute the batch script from normal boot mode.
Reinstall all the Windows 10 Default Apps with Batch Script
@Brink- it seems re-registration (of nominally installed apps) does indeed fail in Safe Mode. It looks as if there's good justification to add a note to the tutorial this cannot be done in Safe Mode.
(The message is different if the app has been uninstalled).
Powershell works in Safe Mode, but perhaps there is an underlying service (referred to in the error) that is not running.
For 'desktop programs' it's possible to enable the installer service in Safe Mode. I'm wondering if there's any equivalent here.
Thanks.
Hi all,
I tried command
It works. However I would like to run from cmd via batch.Code:Get-AppxPackage -AllUsers| Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
I fail with error below. Yeah I can use call PS script, but It is a little bit overkill have a PS script for this and allow running unsigned script etc.Code:powershell -Command "& {Get-AppxPackage -AllUsers| Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}}"
Have somebody idea why batch file fail with the error
Code:Add-AppxPackage : A positional parameter cannot be found that accepts argument '\AppXManifest.xml'. At line:1 char:41 + ... s| Foreach {Add-AppxPackage -DisableDevelopmentMode -Register $($_.In ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Add-AppxPackage], ParameterBindingException + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackag eCommand
You can have a look and use my batch script at post 150.