-
Notifications
You must be signed in to change notification settings - Fork 0
/
HmAssemblyNGen.bat
40 lines (30 loc) · 1011 Bytes
/
HmAssemblyNGen.bat
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
@echo off
rem v1.1.3
rem 通常権限で実行されていば、管理者権限で実行しなおす。
cd /d %~dp0
for /f "tokens=3 delims=\ " %%i in ('whoami /groups^|find "Mandatory"') do set LEVEL=%%i
if NOT "%LEVEL%"=="High" (
powershell.exe -NoProfile -ExecutionPolicy RemoteSigned -Command "Start-Process %~f0 -Verb runas"
exit
)
rem これ以降の処理は管理者権限で実行される
@echo off
cd %~dp0
echo %~dp0
SET CURRENT_TMP_DIR=%~dp0
SET CURRENT_TMP_DIR_WITHOUT_LAST_SEPARATOR=%CURRENT_TMP_DIR:~0,-1%
echo %~dp0
HmAppBitChecker hidemaru.exe
if %ERRORLEVEL%==32 (
echo "秀丸エディタ 32bit版";
for /R %targetdir% %%A in (*.dll) do (
C:\Windows\Microsoft.NET\Framework\v4.0.30319\ngen.exe install %%~fA /AppBase:"%CURRENT_TMP_DIR_WITHOUT_LAST_SEPARATOR%"
)
)
if %ERRORLEVEL%==64 (
echo "秀丸エディタ 64bit版";
for /R %targetdir% %%A in (*.dll) do (
echo %%A
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen.exe install %%~fA /AppBase:"%CURRENT_TMP_DIR_WITHOUT_LAST_SEPARATOR%"
)
)