-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDisableExcelMerge.bat
More file actions
42 lines (41 loc) · 1.56 KB
/
Copy pathDisableExcelMerge.bat
File metadata and controls
42 lines (41 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
@ECHO OFF
REM QBFC Project Options Begin
REM HasVersionInfo: Yes
REM Companyname: Vectra LLC
REM Productname: Disable_Excel_Merge
REM Filedescription:
REM Copyrights: Vectra LLC@2020
REM Trademarks:
REM Originalname:
REM Comments:
REM Productversion: 02.00.00.00
REM Fileversion: 02.00.00.00
REM Internalname: Disable_Excel_Merge
REM Appicon:
REM AdministratorManifest: No
REM QBFC Project Options End
@ECHO ON
@echo OFF
FOR /F "tokens=3" %%A in ('REG QUERY "HKCR\Excel.Application\CurVer" /ve') DO SET Version=%%A
echo %Version%
if "%Version%" == "Excel.Application.16" (
REM echo "Found Excel 2016 or Above"
REM reg query "HKCU\Software\Microsoft\Office\16.0\Excel\Options" /v "DisableMergeInstance" /t REG_DWORD>nul
REM echo %errorlevel%
REM if %errorlevel% equ 0 (
REM echo "DisableMergeInstance Registry key Exist - DO NOTHING"
REM ) else (
REM echo "DisableMergeInstance does not Exist - ADDING IT"
reg add "HKCU\Software\Microsoft\Office\16.0\Excel\Options" /v "DisableMergeInstance" /t REG_DWORD /d 1 /f
REM )
) else if "%Version%" == "Excel.Application.15" (
REM echo "Found Excel 2013"
REM reg query "HKCU\Software\Microsoft\Office\15.0\Excel\Options" /v "DisableMergeInstance" /t REG_DWORD >nul
REM echo %errorlevel%
REM if %errorlevel% equ 0 (
REM echo "DisableMergeInstance Registry key Exist - DO NOTHING"
REM ) else (
REM echo "DisableMergeInstance does not Exist - ADDING IT"
reg add HKCU\Software\Microsoft\Office\15.0\Excel\Options /v DisableMergeInstance /t REG_DWORD /d 1 /f
REM )
)