对于双击用Microsoft Office(包括Word、Excel、Powerpoint)打开文件之后展示文件名自动更改、文件名加1等情况的解决办法

首先的说明

本方法由微软客服提供。其不只提供了一种方法,本人按照提供的方法按序操作但是最终解决本人问题的只有最后一种方法。代码段来自微软帮助我解决问题的客服人员。感谢他们的工作和付出。

设备和软件

戴尔G15        Windows11重装Windows10        正版 Microsoft Office 家庭和学生版 2021

问题描述

  • 双击文件图标打开一个Excel文件,文件名为“2022级.xlsx”,打开之后,展示文件名为“2022级1.xlsx”,并且按下Ctrl+S键进行保存,会出现让操作者选择保存文件位置的情况,并且自动填入的文件名为“2022级1.xlsx”。
  •  双击文件图标打开一个PowerPoint文件,文件名为"第五章图像分割1.ppt",打开之后,展示文件名为"演示文稿1.ppt",并且按下Ctrl+S键进行保存,会出现让操作者选择保存文件位置的情况,并且自动填入的文件名为"演示文稿1.ppt" 。

 以上情况在下载的文件和新建的文件中都有发生。Word文档可能也会发生类似的情况。该操作相当于微软Ofiice自作主张新建了一个临时文件

解决方案

方法一——临时解决

在微软客服的询问和按照指导操作的时候,发现了一种临时的解决办法:

在左键单击选中文件之后,右键单击文件图标,选择最上面一栏:打开

 可以发现打开的文件展示为原文件名,文件名并没有变更

对于Excel文件同样适用

但是每次这么操作都很麻烦

方法二——卸载WPS并修复微软Office

如大家所闻,金山公司经常干一些对于个人电脑不大好的事情,可能金山公司的WPS影响了打开文件的过程

卸载可以使用Geek Uninstaller进行WPS的卸载,同时删除注册表

修复微软Office可以这样操作:右键单击Windows图标,选择第一行“应用和功能”(无法截图),或者Win+I从“设置”中进入以下页面也是可以的

在最右侧栏中左键单击“相关设置”下方的“程序和功能” 

(若窗口并非最大化可以在页面最下方找到“程序和功能” )

 之后会进入以下界面,找到Microsoft Ofiice 家庭和学生版,左键单击选中,右键单击,左键单击选择更改

 遇到“要允许此应用对你的设备进行更改吗”之后选择“是”

之后进入以下界面,勾选联机修复后左键单击“修复”

 等待完成,可能会比较久

不幸的是,方法二对于我的电脑和软件无效

方法三——运行修复程序

具体方法:

提到的链接:https://account.microsoft.com/services/

可以新建.txt文件,复制以下内容粘贴到记事本中,按照上方步骤进行修改文件名后缀等操作

对于O16工具本程序由微软技术支持工程师提供,代码段如下:

:: ==================================================================================
:: NAME     : Uninstall Office 2016.
:: AUTHOR     : Manuel Gil.
:: VERSION     : 2.0.
:: ==================================================================================


:: Screen settings.
:: /************************************************************************************/
:mode

echo off
title Uninstall Office 2016.
color 47

goto permission
:: /************************************************************************************/


:: Print Top Text.
:: /*************************************************************************************/
:print
cls
echo.
echo.Uninstall Office 2016 Tool.
echo.
echo.%*
echo.

goto :eof
:: /************************************************************************************/


:: Checking for Administrator elevation.
:: /************************************************************************************/
:permission
openfiles>nul 2>&1
 
if %errorlevel% EQU 0 goto terms
 
call :print Checking for Administrator elevation.

echo.    You are not running as Administrator.
echo.    This batch cannot do it's job without elevation.
echo.
echo.    You must run this tool as Administrator.
echo.
echo.Press any key to continue . . .
pause>nul
goto :eof
:: /************************************************************************************/


:: Terms.
:: /*************************************************************************************/
:terms
call :print Terms and Conditions.

echo.    The methods inside this batch modify files and registry settings.
echo.    While they are tested and tend to work, I take no responsibility for
echo.    the use of this file.
echo.    This batch is provided without warranty. Any damage caused is your
echo.    own responsibility.
echo.
echo.    As well, batch files are almost always flagged by anti-virus, feel free
echo.    to review the code if you're unsure.
echo.

choice /c YN /n /m "Do you want to continue with this process? (Yes/No) "
if %errorlevel% EQU 1 goto Menu
if %errorlevel% EQU 2 goto Close

echo.
echo.An unexpected error has occurred.
echo.
echo.Press any key to continue . . .
pause>nul
goto :eof
:: /*************************************************************************************/


:: Menu of tool.
:: /*************************************************************************************/
:Menu
call :print Main menu.

echo.     1. Make backup of Registry.
echo.     2. Uninstall Office 2016.
echo.     3. Delete waste of Office.
echo.     4. Close.
echo.

set /p option=Select option: 

if %option% EQU 1 (
    call :Registry
) else if %option% EQU 2 (
    call :Office16
) else if %option% EQU 3 (
    call :All
) else if %option% EQU 4 (
    goto Close
) else (
    echo.
    echo.Invalid option.
    echo.
    echo.Press any key to continue . . .
    pause>nul
)

goto Menu
:: /*************************************************************************************/


:: Making backup of Registry.
:: /*************************************************************************************/
:Registry

for /f "tokens=1-5 delims=/, " %%a in ("%date%") do (
    set now=%%a%%b%%c%%d%time:~0,2%%time:~3,2%
)

:: ------------------------------------------------------------------------
:: Create a backup of the Registry.
call :print Making a backup copy of the Registry in: %USERPROFILE%\Desktop\Backup%now%.reg

if exist "%USERPROFILE%\Desktop\Backup%now%.reg" (
    echo.An unexpected error has occurred.
    echo.
    echo.    Changes were not carried out in the registry.
    echo.    Will try it later.
    echo.
    echo.Press any key to continue . . .
    pause>nul
    goto :eof
) else (
    regedit /e "%USERPROFILE%\Desktop\Backup%now%.reg"
)
:: ------------------------------------------------------------------------

:: ------------------------------------------------------------------------
:: Checking backup.
call :print Checking the backup copy.

if not exist "%USERPROFILE%\Desktop\Backup%now%.reg" (
    echo.An unexpected error has occurred.
    echo.
    echo.    Something went wrong.
    echo.    You manually create a backup of the registry before continuing.
    echo.
    echo.Press any key to continue . . .
    pause>nul
    goto :eof
) else (
    echo.The operation completed successfully.
    echo.
    echo.Press any key to continue . . .
    pause>nul
    goto :eof
)
:: ------------------------------------------------------------------------

:: /*************************************************************************************/


:: Uninstall Office 2016.
:: /*************************************************************************************/
:Office16

:: --------------------------------------------------
:: Closing apps.
call :print Microsoft Office, Internet Explorer y Windows Explorer go to close.

echo.    Please, save all open documents for continue.
echo.
echo.Press any key to continue . . .
pause>nul
:: --------------------------------------------------

:: --------------------------------------------------
:: Closing Office apps.
call :print Closing the Office apps . . .

taskkill /f /im winword.exe /t
taskkill /f /im excel.exe /t
taskkill /f /im powerpnt.exe /t
taskkill /f /im onenote.exe /t
taskkill /f /im outlook.exe /t
taskkill /f /im mspub.exe /t
taskkill /f /im msaccess.exe /t
taskkill /f /im infopath.exe /t
taskkill /f /im groove.exe /t
taskkill /f /im lync.exe /t
:: --------------------------------------------------

:: --------------------------------------------------
:: Closing Click-to-Run task.
call :print Closing the Office apps . . .

taskkill /f /im officeclicktorun.exe /t
taskkill /f /im officeondemand.exe /t
taskkill /f /im officec2rclient.exe /t
taskkill /f /im appvshnotify.exe /t
taskkill /f /im firstrun.exe /t
taskkill /f /im setup.exe /t
:: --------------------------------------------------

:: --------------------------------------------------
:: Closing others apps.
call :print Closing the Office apps . . .

taskkill /f /im integratedoffice.exe /t
taskkill /f /im integrator.exe /t
taskkill /f /im communicator.exe /t
taskkill /f /im msosync.exe /t
taskkill /f /im onenotem.exe /t
taskkill /f /im iexplore.exe /t
taskkill /f /im mavinject32.exe /t
taskkill /f /im werfault.exe /t
taskkill /f /im perfboost.exe /t
taskkill /f /im roamingoffice.exe /t
taskkill /f /im msiexec.exe /t
taskkill /f /im ose.exe /t
:: --------------------------------------------------

:: --------------------------------------------------
:: Stopping Office Source Engine.
call :print Stopping Office Source Engine service . . .

net stop ose
 
call :print Stopping Office Source Engine service . . .

sc query ose | findstr /I /C:"STOPPED"
If %errorlevel% EQU 0 (
    sc config ose start= disabled obj= LocalSystem
)
:: --------------------------------------------------

:: --------------------------------------------------
:: Removing Office files.
call :print Removing Office files . . .
 
if exist "%PROGRAMFILES%\Microsoft Office 15" (
    takeown /f "%PROGRAMFILES%\Microsoft Office 15"
    attrib -r -s -h /s /d "%PROGRAMFILES%\Microsoft Office 15"
    rmdir /s /q "%PROGRAMFILES%\Microsoft Office 15"
) else if exist "%PROGRAMFILES(x86)%\Microsoft Office 15" (
    takeown /f "%PROGRAMFILES(x86)%\Microsoft Office 15"
    attrib -r -s -h /s /d "%PROGRAMFILES(x86)%\Microsoft Office 15"
    rmdir /s /q "%PROGRAMFILES(x86)%\Microsoft Office 15"
)

if exist "%PROGRAMFILES%\Microsoft Office\root\Integration" (
    cd /d "%PROGRAMFILES%\Microsoft Office\root\Integration"
    takeown /f C2RManifest*.xml
    attrib -r -s -h /s /d C2RManifest*.xml
    del /s /q /f C2RManifest*.xml
) else if exist "%PROGRAMFILES(x86)%\Microsoft Office\root\Integration" (
    cd /d "%PROGRAMFILES(x86)%\Microsoft Office\root\Integration"
    takeown /f C2RManifest*.xml
    attrib -r -s -h /s /d C2RManifest*.xml
    del /s /q /f C2RManifest*.xml
)
 
if exist "%PROGRAMFILES%\Microsoft Office\PackageManifest" (
    takeown /f "%PROGRAMFILES%\Microsoft Office\PackageManifest"
    attrib -r -s -h /s /d "%PROGRAMFILES%\Microsoft Office\PackageManifest"
    rmdir /s /q "%PROGRAMFILES%\Microsoft Office\PackageManifest"
) else if exist "%PROGRAMFILES(x86)%\Microsoft Office\PackageManifest" (
    takeown /f "%PROGRAMFILES(x86)%\Microsoft Office\PackageManifest"
    attrib -r -s -h /s /d "%PROGRAMFILES(x86)%\Microsoft Office\PackageManifest"
    rmdir /s /q "%PROGRAMFILES(x86)%\Microsoft Office\PackageManifest"
)

if exist "%PROGRAMFILES%\Microsoft Office\PackageSunrisePolicies" (
    takeown /f "%PROGRAMFILES%\Microsoft Office\PackageSunrisePolicies"
    attrib -r -s -h /s /d "%PROGRAMFILES%\Microsoft Office\PackageSunrisePolicies"
    rmdir /s /q "%PROGRAMFILES%\Microsoft Office\PackageSunrisePolicies"
) else if exist "%PROGRAMFILES(x86)%\Microsoft Office\PackageSunrisePolicies" (
    takeown /f "%PROGRAMFILES(x86)%\Microsoft Office\PackageSunrisePolicies"
    attrib -r -s -h /s /d "%PROGRAMFILES(x86)%\Microsoft Office\PackageSunrisePolicies"
    rmdir /s /q "%PROGRAMFILES(x86)%\Microsoft Office\PackageSunrisePolicies"
)

if exist "%PROGRAMFILES%\Microsoft Office\root" (
    takeown /f "%PROGRAMFILES%\Microsoft Office\root"
    attrib -r -s -h /s /d "%PROGRAMFILES%\Microsoft Office\root"
    rmdir /s /q "%PROGRAMFILES%\Microsoft Office\root"
) else if exist "%PROGRAMFILES(x86)%\Microsoft Office\root" (
    takeown /f "%PROGRAMFILES(x86)%\Microsoft Office\root"
    attrib -r -s -h /s /d "%PROGRAMFILES(x86)%\Microsoft Office\root"
    rmdir /s /q "%PROGRAMFILES(x86)%\Microsoft Office\root"
)

if exist "%PROGRAMFILES%\Microsoft Office\AppXManifest.xml" (
    takeown /f "%PROGRAMFILES%\Microsoft Office\AppXManifest.xml"
    attrib -r -s -h /s /d "%PROGRAMFILES%\Microsoft Office\AppXManifest.xml"
    del /s /q /f "%PROGRAMFILES%\Microsoft Office\AppXManifest.xml"
) else if exist "%PROGRAMFILES(x86)%\Microsoft Office\AppXManifest.xml" (
    takeown /f "%PROGRAMFILES(x86)%\Microsoft Office\AppXManifest.xml"
    attrib -r -s -h /s /d "%PROGRAMFILES(x86)%\Microsoft Office\AppXManifest.xml"
    del /s /q /f "%PROGRAMFILES(x86)%\Microsoft Office\AppXManifest.xml"
)

if exist "%PROGRAMFILES%\Microsoft Office\FileSystemMetadata.xml" (
    takeown /f "%PROGRAMFILES%\Microsoft Office\FileSystemMetadata.xml"
    attrib -r -s -h /s /d "%PROGRAMFILES%\Microsoft Office\FileSystemMetadata.xml"
    del /s /q /f "%PROGRAMFILES%\Microsoft Office\FileSystemMetadata.xml"
) else if exist "%PROGRAMFILES(x86)%\Microsoft Office\FileSystemMetadata.xml" (
    takeown /f "%PROGRAMFILES(x86)%\Microsoft Office\FileSystemMetadata.xml"
    attrib -r -s -h /s /d "%PROGRAMFILES(x86)%\Microsoft Office\FileSystemMetadata.xml"
    del /s /q /f "%PROGRAMFILES(x86)%\Microsoft Office\FileSystemMetadata.xml"
)

if exist "%PROGRAMDATA%\Microsoft\ClicToRun" (
    takeown /f "%PROGRAMDATA%\Microsoft\ClicToRun"
    attrib -r -s -h /s /d "%PROGRAMDATA%\Microsoft\ClicToRun"
    rmdir /s /q "%PROGRAMDATA%\Microsoft\ClicToRun"
)

if exist "%COMMONPROGRAMFILES%\Microsoft Shared\ClickToRun" (
    takeown /f "%COMMONPROGRAMFILES%\Microsoft Shared\ClickToRun"
    attrib -r -s -h /s /d "%COMMONPROGRAMFILES%\Microsoft Shared\ClickToRun"
    rmdir /s /q "%COMMONPROGRAMFILES%\Microsoft Shared\ClickToRun"
) else if exist "%COMMONPROGRAMFILES(x86)%\Microsoft Shared\ClickToRun" (
    takeown /f "%COMMONPROGRAMFILES(x86)%\Microsoft Shared\ClickToRun"
    attrib -r -s -h /s /d "%COMMONPROGRAMFILES(x86)%\Microsoft Shared\ClickToRun"
    rmdir /s /q "%COMMONPROGRAMFILES(x86)%\Microsoft Shared\ClickToRun"
)

if exist "%PROGRAMDATA%\Microsoft\office\FFPackageLocker" (
    takeown /f "%PROGRAMDATA%\Microsoft\office\FFPackageLocker"
    attrib -r -s -h /s /d "%PROGRAMDATA%\Microsoft\office\FFPackageLocker"
    rmdir /s /q "%PROGRAMDATA%\Microsoft\office\FFPackageLocker"
)

if exist "%PROGRAMDATA%\Microsoft\office\ClickToRunPackageLocker" (
    takeown /f "%PROGRAMDATA%\Microsoft\office\ClickToRunPackageLocker"
    attrib -r -s -h /s /d "%PROGRAMDATA%\Microsoft\office\ClickToRunPackageLocker"
    rmdir /s /q "%PROGRAMDATA%\Microsoft\office\ClickToRunPackageLocker"
)

if exist "%PROGRAMDATA%\Microsoft\office\FFStatePBLocker" (
    takeown /f "%PROGRAMDATA%\Microsoft\office\FFStatePBLocker"
    attrib -r -s -h /s /d "%PROGRAMDATA%\Microsoft\office\FFStatePBLocker"
    rmdir /s /q "%PROGRAMDATA%\Microsoft\office\FFStatePBLocker"
)

if exist "%PROGRAMDATA%\Microsoft\office\Heartbeat" (
    takeown /f "%PROGRAMDATA%\Microsoft\office\Heartbeat"
    attrib -r -s -h /s /d "%PROGRAMDATA%\Microsoft\office\Heartbeat"
    rmdir /s /q "%PROGRAMDATA%\Microsoft\office\Heartbeat"
)

if exist "%USERPROFILE%\Microsoft Office" (
    takeown /f "%USERPROFILE%\Microsoft Office"
    attrib -r -s -h /s /d "%USERPROFILE%\Microsoft Office"
    rmdir /s /q "%USERPROFILE%\Microsoft Office"
)

if exist "%USERPROFILE%\Microsoft Office 15" (
    takeown /f "%USERPROFILE%\Microsoft Office 15"
    attrib -r -s -h /s /d "%USERPROFILE%\Microsoft Office 15"
    rmdir /s /q "%USERPROFILE%\Microsoft Office 15"
)

if exist "%USERPROFILE%\Microsoft Office 16" (
    takeown /f "%USERPROFILE%\Microsoft Office 16"
    attrib -r -s -h /s /d "%USERPROFILE%\Microsoft Office 16"
    rmdir /s /q "%USERPROFILE%\Microsoft Office 16"
)
:: --------------------------------------------------

:: --------------------------------------------------
:: Removing scheduled tasks.
call :print Removing tasks . . .

schtasks.exe /delete /tn "FF_INTEGRATEDstreamSchedule" /f
schtasks.exe /delete /tn "FF_INTEGRATEDUPDATEDETECTION" /f
schtasks.exe /delete /tn "C2RAppVLoggingStart" /f
schtasks.exe /delete /tn "Office 15 Subscription Heartbeat" /f
schtasks.exe /delete /tn "\Microsoft\Office\Office 15 Subscription Heartbeat" /f
schtasks.exe /delete /tn "Microsoft Office 15 Sync Maintenance for {d068b555-9700-40b8-992c-f866287b06c1}" /f
schtasks.exe /delete /tn "\Microsoft\Office\OfficeInventoryAgentFallBack" /f
schtasks.exe /delete /tn "\Microsoft\Office\OfficeTelemetryAgentFallBack" /f
schtasks.exe /delete /tn "\Microsoft\Office\OfficeInventoryAgentLogOn" /f
schtasks.exe /delete /tn "\Microsoft\Office\OfficeTelemetryAgentLogOn" /f
schtasks.exe /delete /tn "Office Background Streaming" /f
schtasks.exe /delete /tn "\Microsoft\Office\Office Automatic Updates" /f
schtasks.exe /delete /tn "\Microsoft\Office\Office ClickToRun Service Monitor" /f
schtasks.exe /delete /tn "Office Subscription Maintenance" /f
schtasks.exe /delete /tn "\Microsoft\Office\Office Subscription Maintenance" /f
:: --------------------------------------------------

:: --------------------------------------------------
:: Removing Click-to-Run service.
call :print Removing Click-to-Run service . . .

sc delete Clicktorunsvc
:: --------------------------------------------------

:: --------------------------------------------------
:: Removing keys in the Registry.
call :print Removing keys in the Registry . . .

reg delete "HKCU\Software\Microsoft\Office\15.0\Registration" /f
reg delete "HKCU\Software\Microsoft\Office\16.0\Registration" /f
reg delete "HKCU\Software\Microsoft\Office\Registration" /f

reg delete "HKLM\SOFTWARE\Microsoft\AppVISV" /f

reg delete "HKLM\SOFTWARE\Microsoft\Office\15.0\Common\InstallRoot\Virtual" /f
reg delete "HKLM\SOFTWARE\Microsoft\Office\16.0\Common\InstallRoot\Virtual" /f
reg delete "HKLM\SOFTWARE\Microsoft\Office\Common\InstallRoot\Virtual" /f

reg delete "HKLM\SOFTWARE\Classes\CLSID\{2027FC3B-CF9D-4ec7-A823-38BA308625CC}" /f

reg delete "HKCU\SOFTWARE\Microsoft\Office\15.0\ClickToRun" /f
reg delete "HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun" /f
reg delete "HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRunStore" /f
reg delete "HKLM\SOFTWARE\Microsoft\Office\16.0\ClickToRun" /f
reg delete "HKLM\SOFTWARE\Microsoft\Office\16.0\ClickToRun" /f
reg delete "HKLM\SOFTWARE\Microsoft\Office\16.0\ClickToRunStore" /f
reg delete "HKCU\SOFTWARE\Microsoft\Office\ClickToRun" /f
reg delete "HKLM\SOFTWARE\Microsoft\Office\ClickToRun" /f
reg delete "HKLM\SOFTWARE\Microsoft\Office\ClickToRunStore" /f

reg delete "HKLM\Software\Microsoft\Office\15.0" /f
reg delete "HKLM\Software\Microsoft\Office\15.0" /f
reg delete "HKLM\Software\Microsoft\Office\16.0" /f
reg delete "HKLM\Software\Microsoft\Office\16.0" /f
reg delete "HKLM\SOFTWARE\Microsoft\Office" /f

reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\Lync15" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\Lync16" /f

reg delete "HKLM\SOFTWARE\Classes\Protocols\Handler\osf" /f

reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\Microsoft SPFS Icon Overlay 1 (ErrorConflict)" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\Microsoft SPFS Icon Overlay 2 (SyncInProgress)" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\Microsoft SPFS Icon Overlay 3 (InSync)" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\Microsoft SPFS Icon Overlay 1 (ErrorConflict)" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\Microsoft SPFS Icon Overlay 2 (SyncInProgress)" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\Microsoft SPFS Icon Overlay 3 (InSync)" /f

reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved\{B28AA736-876B-46DA-B3A8-84C5E30BA492}" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved\{8B02D659-EBBB-43D7-9BBA-52CF22C5B025}" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved\{0875DCB6-C686-4243-9432-ADCCF0B9F2D7}" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved\{42042206-2D85-11D3-8CFF-005004838597}" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved\{993BE281-6695-4BA5-8A2A-7AACBFAAB69E}" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved\{C41662BB-1FA0-4CE0-8DC5-9B7F8279FF97}" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved\{506F4668-F13E-4AA1-BB04-B43203AB3CC0}" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved\{D66DC78C-4F61-447F-942B-3FB6980118CF}" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved\{46137B78-0EC3-426D-8B89-FF7C3A458B5E}" /f

reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\{31D09BA0-12F5-4CCE-BE8A-2923E76605DA}" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\{B4F3A835-0E21-4959-BA22-42B3008E02FF}" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\{D0498E0A-45B7-42AE-A9AA-ABA463DBD3BF}" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\{31D09BA0-12F5-4CCE-BE8A-2923E76605DA}" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\{B4F3A835-0E21-4959-BA22-42B3008E02FF}" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\{D0498E0A-45B7-42AE-A9AA-ABA463DBD3BF}" /f

reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{0875DCB6-C686-4243-9432-ADCCF0B9F2D7}" /f

reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\Namespace\{B28AA736-876B-46DA-B3A8-84C5E30BA492}" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\NetworkNeighborhood\Namespace\{46137B78-0EC3-426D-8B89-FF7C3A458B5E}" /f

reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Microsoft Office Temp Files" /f

set clave=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
set valor=0FF1CE

for /f %%a in ('"reg query "%clave%" | find "%valor%""') do (
    reg delete "%%a" /f
)

set clave=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
set valor=O365

for /f %%a in ('"reg query "%clave%" | find "%valor%""') do (
    reg delete "%%a - en-us" /f
    reg delete "%%a - es-es" /f
)

set clave=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
set valor=ProfessionaRetail

for /f %%a in ('"reg query "%clave%" | find "%valor%""') do (
    reg delete "%%a - en-us" /f
    reg delete "%%a - es-es" /f
)

set clave=HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall
set valor=0FF1CE

for /f %%a in ('"reg query "%clave%" | find "%valor%""') do (
    reg delete "%%a" /f
)

set clave=HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall
set valor=O365

for /f %%a in ('"reg query "%clave%" | find "%valor%""') do (
    reg delete "%%a - en-us" /f
    reg delete "%%a - es-es" /f
)

set clave=HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall
set valor=ProfessionalRetail

for /f %%a in ('"reg query "%clave%" | find "%valor%""') do (
    reg delete "%%a - en-us" /f
    reg delete "%%a - es-es" /f
)
:: --------------------------------------------------

:: --------------------------------------------------
:: Removing shortcuts.
call :print Removing shortcuts . . .
 
if exist "%PROGRAMFILES%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016" (
    takeown /f "%PROGRAMFILES%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016"
    attrib -r -s -h /s /d "%PROGRAMFILES%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016"
    rmdir /s /q "%PROGRAMFILES%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016"
)

if exist "%PROGRAMFILES%\Microsoft\Windows\Start Menu\Programs\Herramientas de Microsoft Office 2016" (
    takeown /f "%PROGRAMFILES%\Microsoft\Windows\Start Menu\Programs\Herramientas de Microsoft Office 2016"
    attrib -r -s -h /s /d "%PROGRAMFILES%\Microsoft\Windows\Start Menu\Programs\Herramientas de Microsoft Office 2016"
    rmdir /s /q "%PROGRAMFILES%\Microsoft\Windows\Start Menu\Programs\Herramientas de Microsoft Office 2016"
)

if exist "%PROGRAMFILES%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016 Tools" (
    takeown /f "%PROGRAMFILES%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016 Tools"
    attrib -r -s -h /s /d "%PROGRAMFILES%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016 Tools"
    rmdir /s /q "%PROGRAMFILES%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016 Tools"
)

cd /d "%PROGRAMFILES%\Microsoft\Windows\Start Menu\Programs"
takeown /f *2016.lnk
attrib -r -s -h /s /d *2016.lnk
del /s /f /q *2016.lnk
 
if exist "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016" (
    takeown /f "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016"
    attrib -r -s -h /s /d "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016"
    rmdir /s /q "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016"
)

if exist "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Herramientas de Microsoft Office 2016" (
    takeown /f "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Herramientas de Microsoft Office 2016"
    attrib -r -s -h /s /d "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Herramientas de Microsoft Office 2016"
    rmdir /s /q "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Herramientas de Microsoft Office 2016"
)

if exist "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016 Tools" (
    takeown /f "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016 Tools"
    attrib -r -s -h /s /d "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016 Tools"
    rmdir /s /q "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016 Tools"
)

cd /d "%APPDATA%\Microsoft\Windows\Start Menu\Programs"
takeown /f *2016.lnk
attrib -r -s -h /s /d *2016.lnk
del /s /f /q *2016.lnk
 
if exist "%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016" (
    takeown /f "%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016"
    attrib -r -s -h /s /d "%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016"
    rmdir /s /q "%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016"
)

if exist "%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Herramientas de Microsoft Office 2016" (
    takeown /f "%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Herramientas de Microsoft Office 2016"
    attrib -r -s -h /s /d "%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Herramientas de Microsoft Office 2016"
    rmdir /s /q "%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Herramientas de Microsoft Office 2016"
)

if exist "%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016 Tools" (
    takeown /f "%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016 Tools"
    attrib -r -s -h /s /d "%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016 Tools"
    rmdir /s /q "%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016 Tools"
)

cd /d "%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs"
takeown /f *2016.lnk
attrib -r -s -h /s /d *2016.lnk
del /s /f /q *2016.lnk
 
if exist "%USERPROFILE%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016" (
    takeown /f "%USERPROFILE%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016"
    attrib -r -s -h /s /d "%USERPROFILE%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016"
    rmdir /s /q "%USERPROFILE%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016"
)

if exist "%USERPROFILE%\Microsoft\Windows\Start Menu\Programs\Herramientas de Microsoft Office 2016" (
    takeown /f "%USERPROFILE%\Microsoft\Windows\Start Menu\Programs\Herramientas de Microsoft Office 2016"
    attrib -r -s -h /s /d "%USERPROFILE%\Microsoft\Windows\Start Menu\Programs\Herramientas de Microsoft Office 2016"
    rmdir /s /q "%USERPROFILE%\Microsoft\Windows\Start Menu\Programs\Herramientas de Microsoft Office 2016"
)

if exist "%USERPROFILE%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016 Tools" (
    takeown /f "%USERPROFILE%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016 Tools"
    attrib -r -s -h /s /d "%USERPROFILE%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016 Tools"
    rmdir /s /q "%USERPROFILE%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016 Tools"
)

cd /d "%USERPROFILE%\Microsoft\Windows\Start Menu\Programs"
takeown /f *2016.lnk
attrib -r -s -h /s /d *2016.lnk
del /s /f /q *2016.lnk
:: --------------------------------------------------

:: --------------------------------------------------
:: End process.
call :print The operation completed successfully.

echo.Press any key to continue . . .
pause>nul
goto :eof
:: --------------------------------------------------

:: /*************************************************************************************/


:: Delete waste of Office.
:: /*************************************************************************************/
:All

:: --------------------------------------------------
:: Closing apps.
call :print Microsoft Office, Internet Explorer y Windows Explorer go to close.

echo.    Please, save all open documents for continue.
echo.
echo.Press any key to continue . . .
pause>nul
:: --------------------------------------------------

:: --------------------------------------------------
:: Closing Office apps.
call :print Closing the Office apps . . .

taskkill /f /im winword.exe /t
taskkill /f /im excel.exe /t
taskkill /f /im powerpnt.exe /t
taskkill /f /im onenote.exe /t
taskkill /f /im outlook.exe /t
taskkill /f /im mspub.exe /t
taskkill /f /im msaccess.exe /t
taskkill /f /im infopath.exe /t
taskkill /f /im groove.exe /t
taskkill /f /im lync.exe /t
:: --------------------------------------------------

:: --------------------------------------------------
:: Closing Click-to-Run task.
call :print Closing the Office apps . . .

taskkill /f /im officeclicktorun.exe /t
taskkill /f /im officeondemand.exe /t
taskkill /f /im officec2rclient.exe /t
taskkill /f /im appvshnotify.exe /t
taskkill /f /im firstrun.exe /t
taskkill /f /im setup.exe /t
:: --------------------------------------------------

:: --------------------------------------------------
:: Closing others apps.
call :print Closing the Office apps . . .

taskkill /f /im integratedoffice.exe /t
taskkill /f /im integrator.exe /t
taskkill /f /im communicator.exe /t
taskkill /f /im msosync.exe /t
taskkill /f /im onenotem.exe /t
taskkill /f /im iexplore.exe /t
taskkill /f /im mavinject32.exe /t
taskkill /f /im werfault.exe /t
taskkill /f /im perfboost.exe /t
taskkill /f /im roamingoffice.exe /t
taskkill /f /im msiexec.exe /t
taskkill /f /im ose.exe /t
:: --------------------------------------------------

:: --------------------------------------------------
:: Stopping Office Source Engine.
call :print Stopping Office Source Engine service . . .

net stop ose

call :print Stopping Office Source Engine service . . .

sc query ose | findstr /I /C:"STOPPED"
If %errorlevel% EQU 0 (
    sc config ose start= disabled obj= LocalSystem
)
:: --------------------------------------------------

:: --------------------------------------------------
:: Removing Office files.
call :print Removing Office files . . .
 
if exist "%PROGRAMFILES%\Microsoft Office 15" (
    rmdir /s /q "%PROGRAMFILES%\Microsoft Office 15"
) else if exist "%PROGRAMFILES(x86)%\Microsoft Office 15" (
    rmdir /s /q "%PROGRAMFILES(x86)%\Microsoft Office 15"
)

if exist "%PROGRAMFILES%\Microsoft Office\root\Integration" (
    cd /d "%PROGRAMFILES%\Microsoft Office\root\Integration"
    del /s /q /f C2RManifest*.xml
) else if exist "%PROGRAMFILES(x86)%\Microsoft Office\root\Integration" (
    cd /d "%PROGRAMFILES(x86)%\Microsoft Office\root\Integration"
    del /s /q /f C2RManifest*.xml
)
 
if exist "%PROGRAMFILES%\Microsoft Office\PackageManifest" (
    rmdir /s /q "%PROGRAMFILES%\Microsoft Office\PackageManifest"
) else if exist "%PROGRAMFILES(x86)%\Microsoft Office\PackageManifest" (
    rmdir /s /q "%PROGRAMFILES(x86)%\Microsoft Office\PackageManifest"
)

if exist "%PROGRAMFILES%\Microsoft Office\PackageSunrisePolicies" (
    rmdir /s /q "%PROGRAMFILES%\Microsoft Office\PackageSunrisePolicies"
) else if exist "%PROGRAMFILES(x86)%\Microsoft Office\PackageSunrisePolicies" (
    rmdir /s /q "%PROGRAMFILES(x86)%\Microsoft Office\PackageSunrisePolicies"
)

if exist "%PROGRAMFILES%\Microsoft Office\root" (
    rmdir /s /q "%PROGRAMFILES%\Microsoft Office\root"
) else if exist "%PROGRAMFILES(x86)%\Microsoft Office\root" (
    rmdir /s /q "%PROGRAMFILES(x86)%\Microsoft Office\root"
)

if exist "%PROGRAMFILES%\Microsoft Office\AppXManifest.xml" (
    del /s /q /f "%PROGRAMFILES%\Microsoft Office\AppXManifest.xml"
) else if exist "%PROGRAMFILES(x86)%\Microsoft Office\AppXManifest.xml" (
    del /s /q /f "%PROGRAMFILES(x86)%\Microsoft Office\AppXManifest.xml"
)

if exist "%PROGRAMFILES%\Microsoft Office\FileSystemMetadata.xml" (
    del /s /q /f "%PROGRAMFILES%\Microsoft Office\FileSystemMetadata.xml"
) else if exist "%PROGRAMFILES(x86)%\Microsoft Office\FileSystemMetadata.xml" (
   del /s /q /f "%PROGRAMFILES(x86)%\Microsoft Office\FileSystemMetadata.xml"
)

if exist "%PROGRAMDATA%\Microsoft\ClicToRun" (
    rmdir /s /q "%PROGRAMDATA%\Microsoft\ClicToRun"
)

if exist "%COMMONPROGRAMFILES%\Microsoft Shared\ClickToRun" (
    rmdir /s /q "%COMMONPROGRAMFILES%\Microsoft Shared\ClickToRun"
) else if exist "%COMMONPROGRAMFILES(x86)%\Microsoft Shared\ClickToRun" (
    rmdir /s /q "%COMMONPROGRAMFILES(x86)%\Microsoft Shared\ClickToRun"
)

if exist "%PROGRAMDATA%\Microsoft\office\FFPackageLocker" (
    rmdir /s /q "%PROGRAMDATA%\Microsoft\office\FFPackageLocker"
)

if exist "%PROGRAMDATA%\Microsoft\office\ClickToRunPackageLocker" (
    rmdir /s /q "%PROGRAMDATA%\Microsoft\office\ClickToRunPackageLocker"
)

if exist "%PROGRAMDATA%\Microsoft\office\FFStatePBLocker" (
    rmdir /s /q "%PROGRAMDATA%\Microsoft\office\FFStatePBLocker"
)

if exist "%PROGRAMDATA%\Microsoft\office\Heartbeat" (
    rmdir /s /q "%PROGRAMDATA%\Microsoft\office\Heartbeat"
)

if exist "%USERPROFILE%\Microsoft Office" (
    rmdir /s /q "%USERPROFILE%\Microsoft Office"
)

if exist "%USERPROFILE%\Microsoft Office 15" (
    rmdir /s /q "%USERPROFILE%\Microsoft Office 15"
)

if exist "%USERPROFILE%\Microsoft Office 16" (
    rmdir /s /q "%USERPROFILE%\Microsoft Office 16"
)

if exist "%PROGRAMFILES%\Microsoft Office" (
    rmdir /s /q "%PROGRAMFILES%\Microsoft Office"
) else if exist "%PROGRAMFILES(x86)%\Microsoft Office" (
    rmdir /s /q "%PROGRAMFILES(x86)%\Microsoft Office"
)

if exist "%COMMONPROGRAMFILES%\Microsoft Shared\Office11" (
    rmdir /s /q "%COMMONPROGRAMFILES%\Microsoft Shared\Office11"
) else if exist "%COMMONPROGRAMFILES(x86)%\Microsoft Shared\Office11" (
    rmdir /s /q "%COMMONPROGRAMFILES(x86)%\Microsoft Shared\Office11"
)

if exist "%COMMONPROGRAMFILES%\Microsoft Shared\Office12" (
    rmdir /s /q "%COMMONPROGRAMFILES%\Microsoft Shared\Office12"
) else if exist "%COMMONPROGRAMFILES(x86)%\Microsoft Shared\Office12" (
    rmdir /s /q "%COMMONPROGRAMFILES(x86)%\Microsoft Shared\Office12"
)

if exist "%COMMONPROGRAMFILES%\Microsoft Shared\Office14" (
    rmdir /s /q "%COMMONPROGRAMFILES%\Microsoft Shared\Office14"
) else if exist "%COMMONPROGRAMFILES(x86)%\Microsoft Shared\Office14" (
    rmdir /s /q "%COMMONPROGRAMFILES(x86)%\Microsoft Shared\Office14"
)

if exist "%COMMONPROGRAMFILES%\Microsoft Shared\Office15" (
    rmdir /s /q "%COMMONPROGRAMFILES%\Microsoft Shared\Office15"
) else if exist "%COMMONPROGRAMFILES(x86)%\Microsoft Shared\Office15" (
    rmdir /s /q "%COMMONPROGRAMFILES(x86)%\Microsoft Shared\Office15"
)

if exist "%COMMONPROGRAMFILES%\Microsoft Shared\Source Engine" (
    rmdir /s /q "%COMMONPROGRAMFILES%\Microsoft Shared\Source Engine"
) else if exist "%COMMONPROGRAMFILES(x86)%\Microsoft Shared\Source Engine" (
    rmdir /s /q "%COMMONPROGRAMFILES(x86)%\Microsoft Shared\Source Engine"
)

if exist "%APPDATA%\microsoft\templates\Normal.dotm" (
    del /s /q /f "%APPDATA%\microsoft\templates\Normal.dotm"
)

if exist "%APPDATA%\microsoft\templates\Word.dotx" (
    del /s /q /f "%APPDATA%\microsoft\templates\Word.dotx"
)

if exist "%APPDATA%\microsoft\document building blocks\3082\15\Building Blocks.dotx" (
    del /s /q /f "%APPDATA%\microsoft\document building blocks\3082\15\Building Blocks.dotx"
)

if exist "%ALLUSERSPROFILE%\Microsoft\Office" (
    rmdir /s /q "%ALLUSERSPROFILE%\Microsoft\Office"
)

if exist "%USERPROFILE%\Microsoft\Office" (
    rmdir /s /q "%USERPROFILE%\Microsoft\Office"
)
:: --------------------------------------------------

:: --------------------------------------------------
:: Removing temporary files in Windows.
call :print Removing temporary files in Windows . . .

cd /d %TEMP%
del /s /f /q *.*
:: --------------------------------------------------

:: --------------------------------------------------
:: Removing keys in the Registry.
call :print Removing keys in the Registry . . .

reg delete "HKCU\Software\Microsoft\Office\15.0\Registration" /f
reg delete "HKCU\Software\Microsoft\Office\16.0\Registration" /f
reg delete "HKCU\Software\Microsoft\Office\Registration" /f

reg delete "HKLM\SOFTWARE\Microsoft\AppVISV" /f

reg delete "HKLM\SOFTWARE\Microsoft\Office\15.0\Common\InstallRoot\Virtual" /f
reg delete "HKLM\SOFTWARE\Microsoft\Office\16.0\Common\InstallRoot\Virtual" /f
reg delete "HKLM\SOFTWARE\Microsoft\Office\Common\InstallRoot\Virtual" /f

reg delete "HKLM\SOFTWARE\Classes\CLSID\{2027FC3B-CF9D-4ec7-A823-38BA308625CC}" /f

reg delete "HKCU\SOFTWARE\Microsoft\Office\15.0\ClickToRun" /f
reg delete "HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun" /f
reg delete "HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRunStore" /f
reg delete "HKLM\SOFTWARE\Microsoft\Office\16.0\ClickToRun" /f
reg delete "HKLM\SOFTWARE\Microsoft\Office\16.0\ClickToRun" /f
reg delete "HKLM\SOFTWARE\Microsoft\Office\16.0\ClickToRunStore" /f
reg delete "HKCU\SOFTWARE\Microsoft\Office\ClickToRun" /f
reg delete "HKLM\SOFTWARE\Microsoft\Office\ClickToRun" /f
reg delete "HKLM\SOFTWARE\Microsoft\Office\ClickToRunStore" /f

reg delete "HKLM\Software\Microsoft\Office\15.0" /f
reg delete "HKLM\Software\Microsoft\Office\15.0" /f
reg delete "HKLM\Software\Microsoft\Office\16.0" /f
reg delete "HKLM\Software\Microsoft\Office\16.0" /f
reg delete "HKLM\SOFTWARE\Microsoft\Office" /f

reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\Lync15" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\Lync16" /f

reg delete "HKLM\SOFTWARE\Classes\Protocols\Handler\osf" /f

reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\Microsoft SPFS Icon Overlay 1 (ErrorConflict)" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\Microsoft SPFS Icon Overlay 2 (SyncInProgress)" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\Microsoft SPFS Icon Overlay 3 (InSync)" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\Microsoft SPFS Icon Overlay 1 (ErrorConflict)" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\Microsoft SPFS Icon Overlay 2 (SyncInProgress)" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\Microsoft SPFS Icon Overlay 3 (InSync)" /f

reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved\{B28AA736-876B-46DA-B3A8-84C5E30BA492}" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved\{8B02D659-EBBB-43D7-9BBA-52CF22C5B025}" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved\{0875DCB6-C686-4243-9432-ADCCF0B9F2D7}" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved\{42042206-2D85-11D3-8CFF-005004838597}" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved\{993BE281-6695-4BA5-8A2A-7AACBFAAB69E}" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved\{C41662BB-1FA0-4CE0-8DC5-9B7F8279FF97}" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved\{506F4668-F13E-4AA1-BB04-B43203AB3CC0}" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved\{D66DC78C-4F61-447F-942B-3FB6980118CF}" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved\{46137B78-0EC3-426D-8B89-FF7C3A458B5E}" /f

reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\{31D09BA0-12F5-4CCE-BE8A-2923E76605DA}" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\{B4F3A835-0E21-4959-BA22-42B3008E02FF}" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\{D0498E0A-45B7-42AE-A9AA-ABA463DBD3BF}" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\{31D09BA0-12F5-4CCE-BE8A-2923E76605DA}" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\{B4F3A835-0E21-4959-BA22-42B3008E02FF}" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\{D0498E0A-45B7-42AE-A9AA-ABA463DBD3BF}" /f

reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{0875DCB6-C686-4243-9432-ADCCF0B9F2D7}" /f

reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\Namespace\{B28AA736-876B-46DA-B3A8-84C5E30BA492}" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\NetworkNeighborhood\Namespace\{46137B78-0EC3-426D-8B89-FF7C3A458B5E}" /f

reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Microsoft Office Temp Files" /f

reg delete "HKCU\Software\Microsoft\Office" /f
reg delete "HKLM\SOFTWARE\Microsoft\Office" /f
reg delete "HKLM\SYSTEM\CurrentControlSet\Services\ose" /f

reg delete "HKLM\SOFTWARE\Microsoft\AppVISV" /f

reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Office" /f

set clave=HKLM\SOFTWARE\Microsoft\Office\Delivery\SourceEngine\Downloads
set valor=0FF1CE}

for /f %%a in ('"reg query "%clave%" | find "%valor%""') do (
    reg delete "%%a" /f
)

set clave=HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\Delivery\SourceEngine\Downloads
set valor=0FF1CE}

for /f %%a in ('"reg query "%clave%" | find "%valor%""') do (
    reg delete "%%a" /f
)

set clave=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
set valor=0FF1CE

for /f %%a in ('"reg query "%clave%" | find "%valor%""') do (
    reg delete "%%a" /f
)

set clave=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
set valor=O365

for /f %%a in ('"reg query "%clave%" | find "%valor%""') do (
    reg delete "%%a - en-us" /f
    reg delete "%%a - es-es" /f
)

set clave=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
set valor=ProfessionaRetail

for /f %%a in ('"reg query "%clave%" | find "%valor%""') do (
    reg delete "%%a - en-us" /f
   reg delete "%%a - es-es" /f
)

set clave=HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall
set valor=0FF1CE

for /f %%a in ('"reg query "%clave%" | find "%valor%""') do (
    reg delete "%%a" /f
)

set clave=HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall
set valor=O365

for /f %%a in ('"reg query "%clave%" | find "%valor%""') do (
    reg delete "%%a - en-us" /f
    reg delete "%%a - es-es" /f
)

set clave=HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall
set valor=ProfessionalRetail

for /f %%a in ('"reg query "%clave%" | find "%valor%""') do (
    reg delete "%%a - en-us" /f
    reg delete "%%a - es-es" /f
)

reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Office14.ENTERPRISE" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Office14.ULTIMATE" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Office14.PRO" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Office14.PROPLUS" /f

reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Office14.ENTERPRISER" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Office14.ULTIMATER" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Office14.PROR" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Office14.HOMESTUDENTR" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Office14.STANDARDR" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Office14.SMALLBUSINESSR" /f

reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ENTERPRISE" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ULTIMATE" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\PRO" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\PROPLUS" /f

reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ENTERPRISER" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ULTIMATER" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\PROR" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\HOMESTUDENTR" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\STANDARDR" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\SMALLBUSINESSR" /f

reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Office14.ENTERPRISE" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Office14.ULTIMATE" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Office14.PRO" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Office14.PROPLUS" /f

reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Office14.ENTERPRISER" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Office14.ULTIMATER" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Office14.PROR" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Office14.HOMESTUDENTR" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Office14.STANDARDR" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Office14.SMALLBUSINESSR" /f

reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\ENTERPRISE" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\ULTIMATE" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\PRO" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\PROPLUS" /f

reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\ENTERPRISER" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\ULTIMATER" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\PROR" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\HOMESTUDENTR" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\STANDARDR" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\SMALLBUSINESSR" /f

set clave=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products
set valor=F01FEC

for /f %%a in ('"reg query "%clave%" | find "%valor%""') do (
    reg delete "%%a" /f
)

set clave=HKCR\Installer\Features
set valor=F01FEC

for /f %%a in ('"reg query "%clave%" | find "%valor%""') do (
    reg delete "%%a" /f
)

set clave=HKCR\Installer\Products
set valor=F01FEC

for /f %%a in ('"reg query "%clave%" | find "%valor%""') do (
    reg delete "%%a" /f
)

set clave=HKCR\Installer\UpgradeCodes
set valor=F01FEC

for /f %%a in ('"reg query "%clave%" | find "%valor%""') do (
    reg delete "%%a" /f
)

set clave=HKCR\Installer\Win32Assemblies
set valor=Office16

for /f %%a in ('"reg query "%clave%" | find "%valor%""') do (
    reg delete "%%a" /f
)

set clave=HKCR\Installer\Win32Assemblies
set valor=Office15

for /f %%a in ('"reg query "%clave%" | find "%valor%""') do (
    reg delete "%%a" /f
)

set clave=HKCR\Installer\Win32Assemblies
set valor=Office14

for /f %%a in ('"reg query "%clave%" | find "%valor%""') do (
    reg delete "%%a" /f
)

set clave=HKCR\Installer\Win32Assemblies
set valor=Office12

for /f %%a in ('"reg query "%clave%" | find "%valor%""') do (
    reg delete "%%a" /f
)

set clave=HKCR\Installer\Win32Assemblies
set valor=Office11

for /f %%a in ('"reg query "%clave%" | find "%valor%""') do (
    reg delete "%%a" /f
)

reg delete "HKU\.DEFAULT\Software\Microsoft\Office" /f

reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\winword.exe" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\excel.exe" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\powerpnt.exe" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\onenote.exe" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\outlook.exe" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\mspub.exe" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\msaccess.exe" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\infopath.exe" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\groove.exe" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\lync.exe" /f
:: --------------------------------------------------

:: --------------------------------------------------
:: End process.
call :print The operation completed successfully.

echo.Press any key to continue . . .
pause>nul
goto :eof
:: --------------------------------------------------

:: /*************************************************************************************/


:: End tool.
:: /*************************************************************************************/
:close
del %0
exit
:: /*************************************************************************************/

但是依然很遗憾,该方法并未对本人电脑生效

方法四——删除注册表

该方法由微软技术工程师提供,本人实操生效并解决了文件名自动更改问题

 快速修复方法与方法二所述类似(将勾选联机修复更改为勾选快速修复)

 之后,自动修改文件名的问题解决

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值