mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 00:13:01 -05:00
tools: sxsident.bat
This commit is contained in:
parent
d450683e2e
commit
422c369b15
@ -72,6 +72,7 @@ build_script:
|
||||
- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" tools\gensrc\remove-build-arm64.bat
|
||||
# build winfsp
|
||||
- tools\build.bat %CONFIGURATION%
|
||||
- tools\sxsident.bat > build\VStudio\build\%CONFIGURATION%\winfsp.sxs
|
||||
|
||||
test_script:
|
||||
- choco install winfsp -s build\VStudio\build\%CONFIGURATION% -y --pre
|
||||
|
24
tools/sxsident.bat
Normal file
24
tools/sxsident.bat
Normal file
@ -0,0 +1,24 @@
|
||||
@echo off
|
||||
|
||||
setlocal
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
set SxsDir=
|
||||
set RegKey="HKLM\SOFTWARE\WinFsp"
|
||||
set RegVal="SxsDir"
|
||||
reg query !RegKey! /v !RegVal! /reg:32 >nul 2>&1
|
||||
if !ERRORLEVEL! equ 0 (
|
||||
for /f "tokens=2,*" %%i in ('reg query !RegKey! /v !RegVal! /reg:32 ^| findstr !RegVal!') do (
|
||||
set SxsDir=%%j
|
||||
)
|
||||
)
|
||||
if defined SxsDir (
|
||||
set SxsDir=!SxsDir:*SxS\sxs.=!
|
||||
if !SxsDir:~-1!==\ set SxsDir=!SxsDir:~0,-1!
|
||||
echo !SxsDir!
|
||||
)
|
||||
|
||||
exit /b 0
|
||||
|
||||
:fail
|
||||
exit /b 1
|
Loading…
x
Reference in New Issue
Block a user