-
Run
fix.py
, a Python3 script, with SYSTEM privilege. (NOT Administrator privilege)More detail:
-
If you don't have Python3, just download Python3 installer with the following links:
-
For Windows X86: https://www.python.org/ftp/python/3.7.3/python-3.7.3.exe
-
For Windows X64: https://www.python.org/ftp/python/3.7.3/python-3.7.3-amd64.exe
Then open Python3 installer and you get the Python3 setup window. Make sure to check the checkbox "Add Python 3.7 to PATH" before you click on the Install button. So we don’t have to configure the PATH variable manually.
After the installation is done, you can open Command Prompt and type
python
to check if succeeded. If nothing wrong, you will get a python shell looking like:Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>>
-
-
Now you have Python3. It's time to launch Command Prompt with SYSTEM privilege.
-
Go to here and download a tool called
psexec
. -
Open Command Prompt with Administrator privilege and change current directory to directory where
psexec.exe
exists.Then type
psexec.exe -i -s -d cmd.exe
and you will get a new Command Prompt with SYSTEM privilege.
-
-
In Command Prompt with SYSTEM privilege, change current directory to directory where
fix.py
exists and typefix.py
to run
fix.py
script. If nothing wrong, the output should beTrigger "TRG_AFTER_UPDATE_Package_SRJournal" has been cleared. IsInbox of "Microsoft.Windows.HolographicFirstRun_cw5n1h2txyewy_xxxxx" has been set to 0. Trigger "TRG_AFTER_UPDATE_Package_SRJournal" has been restored.
-
-
Run PowerShell with Administrator privilege. Execute the following command:
Get-AppxPackage -all *HolographicFirstRun* | Remove-AppPackage -AllUsers
to uninstall
Microsoft.Windows.HolographicFirstRun
. -
Reboot
-
After reboot, kill
explorer.exe
andShellExperienceHost.exe
in Task Manager. -
Task Manager -> File -> Run new task
Click Browse button.
In newly-opened window, go to
%localappdata%\Packages\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy
and deleteTempState
directory. -
Start explorer.exe in Task Manager and you will see
ms-resource:AppName/Text
is gone.
-
-
Save DoubleLabyrinth/ffae94cb9444bbdae1d11deeaa247310 to your computer and use it in GitHub Desktop.
import os, sqlite3 | |
conn = sqlite3.connect(os.path.expandvars(r'%ProgramData%\Microsoft\Windows\AppRepository\StateRepository-Machine.srd')) | |
cursor = conn.execute( | |
''' | |
SELECT _PackageID, PackageFullName FROM main.Package | |
WHERE PackageFullName LIKE "Microsoft.Windows.HolographicFirstRun%"; | |
''' | |
) | |
records_to_update = {} | |
for row in cursor: | |
records_to_update[row[0]] = row[1] | |
cursor = conn.execute( | |
''' | |
SELECT name, sql FROM main.sqlite_master | |
WHERE type = "trigger" AND tbl_name = "Package" AND name LIKE "TRG_AFTER_UPDATE%"; | |
''' | |
) | |
triggers_backup = {} | |
for row in cursor: | |
triggers_backup[row[0]] = row[1] | |
# Delete update triggers for table "Package" | |
for TriggerName, TriggerSQL in triggers_backup.items(): | |
conn.execute( | |
''' | |
DROP TRIGGER %s; | |
''' % TriggerName | |
) | |
conn.commit() | |
print('Trigger "%s" has been cleared.' % TriggerName) | |
# Set IsInbox to 0 | |
for PackageID, PackageFullName in records_to_update.items(): | |
conn.execute( | |
''' | |
UPDATE main.Package SET IsInbox = 0 WHERE _PackageID = %d; | |
''' % PackageID | |
) | |
conn.commit() | |
print('IsInbox of "%s" has been set to 0.' % PackageFullName) | |
# Restore triggers | |
for TriggerName, TriggerSQL in triggers_backup.items(): | |
conn.execute( | |
''' | |
%s; | |
''' % TriggerSQL | |
) | |
conn.commit() | |
print('Trigger "%s" has been restored.' % TriggerName) |
I got this:
d:\folder>fix.py
Traceback (most recent call last):
File "D:\folder\fix.py", line 9, in <module>
'''
sqlite3.OperationalError: disk I/O error
d:\folder>
@naveenm0077
You can add python to system variables. Of course, if you don't want to bother to do that, you can specify the full path of python, like
C:\python37-x64\python.exe fix.py
PS: Change C:\python37-x64\python.exe
to your python path
@mesteele101
When this happens, it means you run fix.py
in Administrator privilege, not SYSTEM privilege which is required when access to %ProgramData%\Microsoft\Windows\AppRepository\StateRepository-Machine.srd
.
@DoubleLabyrinth It worked! Thank you :)
This worked perfect :) The ONLY thing that was not correct in my case was ShellExperianceHost.exe as it was not showing in Task manager. I continued on and the tutorial completed with a successful removal of the mutant entry :)
Thanks...
Hello I am new to programming logic and Python, I am trying to resolve this error. But I am confused. I figured out we are supposed to create our own .py script through note pad. And I put that on the desktop my Python is found in: C:\Users\Kyle R. Balitz\AppData\Local\Programs\Python\Python37 And I am unable to run the script with python? Thank you. I believe I downloaded everything correctly...
@CheonHoPark
The problem is that your username has space characters.
You should use a pair of double-quotation-mark to quote the whole path, like:
python.exe "C:\Users\Kyle R. Balitz\Desktop\fix.py"
Does the copy of Python 3 from Microsoft Store work too?
And on a side note, I think by "mutant entry", you mean "zombie shortcut". An item is metaphorically described as a "zombie" if it lingers when it is supposed to die and disappear.
-
If you can access the Python3 from Microsoft Store in Command Prompt with SYSTEM privilege, it should work.
-
Yes, I mean "zombie shortcut". The words "mutant entry" were from a question in Microsoft Community. I just picked them handily there.
@DoubleLabyrinth Thank you. Solved here ;
- In my case, i created file
fix.py
in my notepad, copy and paste the fix.py code from here and save in%PYTHON%\Tools\scripts\
. - The same way, i followed the path and run
psexec.exe -i -s -d cmd.exe
, like thereadme.md
file - Locate the folder
%PYTHON%\Tools\scripts\
- run
python.exe fix.py
and follow thereadme.md
and done.
PS. In task manager look for Details tab will be more easy to find and kill explorer.exe
and ShellExperienceHost.exe
after reboot. I hope this help.
Thank you for this method is very effective! ! !
Finally solved the problem of the start menu "ms-resource:AppName/Text"
Hi, I am having trouble using the script.
According readme.md, executing this powershell command is after executing the python script:
Get-AppxPackage -all *HolographicFirstRun* | Remove-AppPackage -AllUsers
But I have not found here before, I have already executed this command before I found here. So I execute the command again, it say "Remove-AppPackage : Element not found".
Then, I kill explorer.exe and ShellExperienceHost.exe and delete TempState
directory.
After restart explorer.exe, TempState
directory has appeared again. "ms-resource:AppName/Text" has not been removed. Anyone have a solution?
@RazeSoldier
Well, deleting TempState
directory is just to make sure that some cache is cleared. So it is expected that TempState
directory appears again.
If you executed that command and still saw ms-resource:AppName/Text
, maybe such mutant entry is not residual that is left by *HolographicFirstRun*
. I'm afraid to say you need to find another ways. I can't help you.
Thank you! This weird entry really bothered me and this fix worked flawlessly!
Thanks so much - it worked for me, but not before I struggled with python a bit as "system" and not needing to delete ShellExperienceHost.exe in TM (it wasn't there/running).
Other than that, my mutant entry is now a ghost. Many thanks!
I have a corrupted app that I cannot uninstall and it's inbox is already 0. Can the python script be modified to delete a row instead? If so, how?
I have a corrupted app that I cannot uninstall and it's inbox is already 0. Can the python script be modified to delete a row instead? If so, how?
I have the same issue with like 20 apps, same error code but IsInbox is already 0 everywhere
hey, I have no idea what any of this stuff means but I do have the same problem. I've already installed python (don't know what it's for) I just want this ms resource: AppName off my computer can someone break this down for me, please?
C:>PsExec64.exe -accepteula -s cmd.exe /c C:\Python\Python37\python.exe C:\fix.py
Traceback (most recent call last):
File "C:\fix.py", line 40, in
''' % PackageID
sqlite3.OperationalError: no such function: is_srjournal_enabled
cmd.exe exited on WIN-1VCFKOM31F9 with error code 1.
I get this error when running fix.py
Traceback (most recent call last):
File "C:\Users<user>\Downloads\fix\fix.py", line 9, in
'''
sqlite3.DatabaseError: file is encrypted or is not a database
I get this error when running fix.py
Traceback (most recent call last):
File "C:\Users<user>\Documents\fix.py", line 37, in
conn.execute(
sqlite3.OperationalError: no such function: is_srjournal_enabled
I get this error when running fix.py
Traceback (most recent call last): File "C:\Users\Documents\fix.py", line 37, in conn.execute( sqlite3.OperationalError: no such function: is_srjournal_enabled
Does anyone know how to fix this?
On line 18, the trigger name should be changed from "TRG_AFTER_UPDATE%" to "TRG_AFTERUPDATE%"
I have uninstalled Microsoft Edge succesfully by above fix, (with a small edit), thanks.
When I ran
fix.py
in Command Prompt with SYSTEM privilege I got:
Can't find a default Python.
I have Python path in user variables for admin, do I have to add it in system variables too?
i try to execute fix.py but i have an error on ligne :
SELECT _PackageID, PackageFullName FROM main.Package WHERE PackageFullName LIKE "Microsoft.Windows.HolographicFirstRun%";
on SELECT command : SyntaxError : invalid syntax
i don't know what to do.
canyou help please ?
When I ran
fix.py
in Command Prompt with SYSTEM privilege I got:
Can't find a default Python.
I have Python path in user variables for admin, do I have to add it in system variables too?
When I ran
fix.py
in Command Prompt with SYSTEM privilege I got:
Can't find a default Python.
I have Python path in user variables for admin, do I have to add it in system variables too?
i try to execute fix.py but i have an error on ligne :
SELECT _PackageID, PackageFullName FROM main.Package WHERE PackageFullName LIKE "Microsoft.Windows.HolographicFirstRun%";
on SELECT command : SyntaxError : invalid syntax
i don't know what to do.
canyou help please ?
When I ran
fix.py
in Command Prompt with SYSTEM privilege I got:
Can't find a default Python.
I have Python path in user variables for admin, do I have to add it in system variables too?