-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.bat
More file actions
239 lines (204 loc) · 10.3 KB
/
Copy pathinstall.bat
File metadata and controls
239 lines (204 loc) · 10.3 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
@echo off
setlocal enabledelayedexpansion
title Missing Files Finder - Setup
chcp 65001 >nul 2>&1
cls
echo.
echo ╔══════════════════════════════════════════════════════════════╗
echo ║ ║
echo ║ MISSING FILES FINDER · Installer ║
echo ║ by Mickey Perry ║
echo ║ ║
echo ╚══════════════════════════════════════════════════════════════╝
echo.
set "SCRIPT_DIR=%~dp0"
set "CEP_EXT=%APPDATA%\Adobe\CEP\extensions\com.missingfilesae.panel"
set "EV_DIR=%LOCALAPPDATA%\MissingFilesFinder\Everything"
set "EV_EXE=%EV_DIR%\Everything64.exe"
set "STARTUP_DIR=%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup"
set "DESKTOP=%USERPROFILE%\Desktop"
rem ────────────────────────────────────────────────────────────
rem 1 / 5 AE Extension
rem ────────────────────────────────────────────────────────────
echo [ 1 / 5 ] Installing AE panel...
if not exist "%APPDATA%\Adobe\CEP\extensions" (
mkdir "%APPDATA%\Adobe\CEP\extensions" >nul 2>&1
)
if exist "%CEP_EXT%" ( rmdir /s /q "%CEP_EXT%" >nul 2>&1 )
xcopy /E /I /Y /Q "%SCRIPT_DIR%com.missingfilesae.panel" "%CEP_EXT%" >nul
if %errorlevel% neq 0 (
echo.
echo ERROR: Failed to copy panel files.
echo Make sure com.missingfilesae.panel is next to install.bat.
goto :fail
)
echo OK Panel installed
echo.
rem ────────────────────────────────────────────────────────────
rem 2 / 5 Registry - PlayerDebugMode
rem ────────────────────────────────────────────────────────────
echo [ 2 / 5 ] Enabling unsigned CEP extensions...
for %%V in (10 11 12 13) do (
reg add "HKCU\Software\Adobe\CSXS.%%V" /v PlayerDebugMode /t REG_SZ /d 1 /f >nul 2>&1
)
echo OK PlayerDebugMode set (CSXS.10 - 13)
echo.
rem ────────────────────────────────────────────────────────────
rem 3 / 5 Everything Search Engine (portable)
rem ────────────────────────────────────────────────────────────
echo [ 3 / 5 ] Setting up Everything search engine...
if not exist "%EV_DIR%" ( mkdir "%EV_DIR%" >nul 2>&1 )
rem Bundled exe takes priority
if exist "%SCRIPT_DIR%tools\Everything64.exe" (
copy /Y "%SCRIPT_DIR%tools\Everything64.exe" "%EV_EXE%" >nul
echo OK Copied bundled Everything64.exe
goto :ev_ini
)
rem Not bundled — download portable ZIP from voidtools
if not exist "%EV_EXE%" (
echo Downloading Everything portable from voidtools.com...
set "ZIP=%TEMP%\Everything_mff.zip"
powershell -NoProfile -Command ^
"$p='SilentlyContinue'; $ProgressPreference=$p;" ^
"try { Invoke-WebRequest -Uri 'https://www.voidtools.com/Everything-1.4.1.1026.x64.zip' -OutFile '!ZIP!' -UseBasicParsing -ErrorAction Stop }" ^
"catch { exit 1 }" >nul 2>&1
if exist "!ZIP!" (
powershell -NoProfile -Command ^
"Expand-Archive -Path '!ZIP!' -DestinationPath '%EV_DIR%' -Force" >nul 2>&1
del "!ZIP!" >nul 2>&1
)
)
if not exist "%EV_EXE%" (
echo.
echo WARN Could not get Everything automatically.
echo.
echo Download the portable x64 ZIP from:
echo https://www.voidtools.com/downloads/
echo.
echo Extract Everything64.exe to:
echo %EV_DIR%\
echo.
echo Then run this installer again.
echo.
echo ──────────────────────────────────────────────────────────────
goto :ev_skip
)
echo OK Downloaded Everything64.exe
:ev_ini
rem Write pre-configured INI (HTTP on 8080, no auth)
if exist "%SCRIPT_DIR%tools\Everything.ini" (
copy /Y "%SCRIPT_DIR%tools\Everything.ini" "%EV_DIR%\Everything.ini" >nul
) else (
(
echo [Everything]
echo http_server=1
echo http_server_port=8080
echo http_server_username=
echo http_server_password=
echo http_server_bindings=0.0.0.0
) > "%EV_DIR%\Everything.ini"
)
echo OK HTTP server configured (port 8080, no auth)
echo.
:ev_skip
rem ────────────────────────────────────────────────────────────
rem 4 / 5 Compile AHK script to standalone EXE
rem (so target machines don't need AutoHotkey installed)
rem ────────────────────────────────────────────────────────────
echo [ 4 / 5 ] Compiling AHK script to standalone exe...
set "AHK_SRC=%CEP_EXT%\replace_footage_paste_uia.ahk"
set "AHK_OUT=%CEP_EXT%\replace_footage_paste_uia.exe"
set "AHK2EXE="
set "AHK_BASE="
rem Locate Ahk2Exe compiler
for %%P in (
"C:\Program Files\AutoHotkey\v2\Compiler\Ahk2Exe.exe"
"C:\Program Files\AutoHotkey\Compiler\Ahk2Exe.exe"
"C:\Program Files (x86)\AutoHotkey\Compiler\Ahk2Exe.exe"
) do (
if exist %%P ( set "AHK2EXE=%%~P" )
)
rem Locate AHK v2 runtime (base exe to embed)
for %%P in (
"C:\Program Files\AutoHotkey\v2\AutoHotkey64.exe"
"C:\Program Files\AutoHotkey\v2\AutoHotkey.exe"
"C:\Program Files\AutoHotkey\AutoHotkey64.exe"
) do (
if exist %%P ( set "AHK_BASE=%%~P" )
)
rem Check if a pre-compiled exe was already bundled
if exist "%AHK_OUT%" (
echo OK Pre-compiled exe already present (skipping compilation)
goto :ahk_done
)
if not defined AHK2EXE (
echo SKIP Ahk2Exe compiler not found
echo AutoHotkey v2 will be required on machines for PSD relink
goto :ahk_done
)
if not defined AHK_BASE (
echo SKIP AutoHotkey v2 runtime not found
goto :ahk_done
)
"%AHK2EXE%" /in "%AHK_SRC%" /out "%AHK_OUT%" /base "%AHK_BASE%" >nul 2>&1
if exist "%AHK_OUT%" (
echo OK Compiled to replace_footage_paste_uia.exe
echo AutoHotkey NOT required on target machines
) else (
echo WARN Compilation failed - AHK v2 still needed for PSD relink
)
:ahk_done
echo.
rem ────────────────────────────────────────────────────────────
rem 5 / 5 Shortcuts + launch Everything
rem ────────────────────────────────────────────────────────────
echo [ 5 / 5 ] Creating shortcuts and starting Everything...
if exist "%EV_EXE%" (
rem Desktop shortcut
powershell -NoProfile -Command ^
"$ws=New-Object -ComObject WScript.Shell;" ^
"$s=$ws.CreateShortcut('%DESKTOP%\Everything (MFF).lnk');" ^
"$s.TargetPath='%EV_EXE%'; $s.WorkingDirectory='%EV_DIR%';" ^
"$s.Description='Everything - Missing Files Finder'; $s.Save()" >nul 2>&1
echo OK Desktop shortcut created
rem Startup shortcut (auto-start with Windows)
powershell -NoProfile -Command ^
"$ws=New-Object -ComObject WScript.Shell;" ^
"$s=$ws.CreateShortcut('%STARTUP_DIR%\Everything (MFF).lnk');" ^
"$s.TargetPath='%EV_EXE%'; $s.Arguments='-startup';" ^
"$s.WorkingDirectory='%EV_DIR%';" ^
"$s.Description='Everything - Missing Files Finder'; $s.Save()" >nul 2>&1
echo OK Windows startup entry created
rem Kill any old instance and relaunch with our fresh INI
taskkill /IM Everything64.exe /F >nul 2>&1
timeout /t 1 /nobreak >nul 2>&1
start "" "%EV_EXE%"
echo OK Everything is running (check system tray for ∞)
) else (
echo SKIP Everything not found - start manually when ready
)
echo.
rem ────────────────────────────────────────────────────────────
rem Done — open setup guide in browser
rem ────────────────────────────────────────────────────────────
echo ╔══════════════════════════════════════════════════════════════╗
echo ║ ║
echo ║ Installation complete! ║
echo ║ ║
echo ║ Restart After Effects, then: ║
echo ║ Window → Missing Files Finder ║
echo ║ ║
echo ╚══════════════════════════════════════════════════════════════╝
echo.
rem Open INSTALL.html so the status checker shows green
if exist "%SCRIPT_DIR%INSTALL.html" (
start "" "%SCRIPT_DIR%INSTALL.html"
)
echo Press any key to close...
pause >nul
exit /b 0
:fail
echo.
echo Installation failed. Press any key to exit.
pause >nul
exit /b 1