mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 16:33:02 -05:00
launcher: change registry location
This commit is contained in:
parent
b299027f6e
commit
aeaeba0dd6
@ -22,7 +22,7 @@
|
|||||||
<Media Id="1" Cabinet="WinFsp.cab" EmbedCab="yes" />
|
<Media Id="1" Cabinet="WinFsp.cab" EmbedCab="yes" />
|
||||||
|
|
||||||
<Property Id="P.LauncherName">$(var.MyProductName).Launcher</Property>
|
<Property Id="P.LauncherName">$(var.MyProductName).Launcher</Property>
|
||||||
<Property Id="P.LauncherRegistryKey">SYSTEM\\CurrentControlSet\\Services\\$(var.MyProductName).Launcher\\Services</Property>
|
<Property Id="P.LauncherRegistryKey">Software\$(var.MyProductName)\Services</Property>
|
||||||
<Property Id="P.RegistryKey">Software\$(var.MyProductName)</Property>
|
<Property Id="P.RegistryKey">Software\$(var.MyProductName)</Property>
|
||||||
<Property Id="INSTALLDIR">
|
<Property Id="INSTALLDIR">
|
||||||
<RegistrySearch
|
<RegistrySearch
|
||||||
|
@ -20,19 +20,21 @@ In order to overcome the issue with launching multiple instances of a particular
|
|||||||
|
|
||||||
Services that wish to be controlled by the WinFsp.Launcher must add themselves under the following registry key:
|
Services that wish to be controlled by the WinFsp.Launcher must add themselves under the following registry key:
|
||||||
|
|
||||||
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinFsp.Launcher\Services
|
HKEY_LOCAL_MACHINE\Software\WinFsp\Services
|
||||||
|
|
||||||
For example, the MEMFS sample adds the following registry entries under this key:
|
NOTE: Please note that in a 64-bit system the actual location is `HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\WinFsp\Services`.
|
||||||
|
|
||||||
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinFsp.Launcher\Services\memfs32]
|
For example, the MEMFS sample adds the following registry entries in a 64-bit system:
|
||||||
|
|
||||||
|
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\WinFsp\Services\memfs32]
|
||||||
"Executable"="C:\\Program Files (x86)\\WinFsp\\bin\\memfs-x86.exe"
|
"Executable"="C:\\Program Files (x86)\\WinFsp\\bin\\memfs-x86.exe"
|
||||||
"CommandLine"="-u %1 -m %2"
|
"CommandLine"="-i -F NTFS -n 65536 -s 67108864 -u %1 -m %2"
|
||||||
"Security"="D:P(A;;RPWPLC;;;WD)"
|
"Security"="D:P(A;;RPWPLC;;;WD)"
|
||||||
"JobControl"=dword:00000001
|
"JobControl"=dword:00000001
|
||||||
|
|
||||||
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinFsp.Launcher\Services\memfs64]
|
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\WinFsp\Services\memfs64]
|
||||||
"Executable"="C:\\Program Files (x86)\\WinFsp\\bin\\memfs-x64.exe"
|
"Executable"="C:\\Program Files (x86)\\WinFsp\\bin\\memfs-x64.exe"
|
||||||
"CommandLine"="-u %1 -m %2"
|
"CommandLine"="-i -F NTFS -n 65536 -s 67108864 -u %1 -m %2"
|
||||||
"Security"="D:P(A;;RPWPLC;;;WD)"
|
"Security"="D:P(A;;RPWPLC;;;WD)"
|
||||||
"JobControl"=dword:00000001
|
"JobControl"=dword:00000001
|
||||||
|
|
||||||
|
@ -284,7 +284,8 @@ static DWORD FspNpGetCredentialsKind(PWSTR RemoteName, PDWORD PCredentialsKind)
|
|||||||
memcpy(ClassNameBuf, ClassName, ClassNameLen * sizeof(WCHAR));
|
memcpy(ClassNameBuf, ClassName, ClassNameLen * sizeof(WCHAR));
|
||||||
ClassNameBuf[ClassNameLen] = '\0';
|
ClassNameBuf[ClassNameLen] = '\0';
|
||||||
|
|
||||||
NpResult = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"" LAUNCHER_REGKEY, 0, KEY_READ, &RegKey);
|
NpResult = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"" LAUNCHER_REGKEY,
|
||||||
|
0, LAUNCHER_REGKEY_WOW64 | KEY_READ, &RegKey);
|
||||||
if (ERROR_SUCCESS != NpResult)
|
if (ERROR_SUCCESS != NpResult)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
#include <sddl.h>
|
#include <sddl.h>
|
||||||
|
|
||||||
#define PROGNAME "WinFsp.Launcher"
|
#define PROGNAME "WinFsp.Launcher"
|
||||||
#define REGKEY LAUNCHER_REGKEY
|
|
||||||
|
|
||||||
BOOL CreateOverlappedPipe(
|
BOOL CreateOverlappedPipe(
|
||||||
PHANDLE PReadPipe, PHANDLE PWritePipe, PSECURITY_ATTRIBUTES SecurityAttributes, DWORD Size,
|
PHANDLE PReadPipe, PHANDLE PWritePipe, PSECURITY_ATTRIBUTES SecurityAttributes, DWORD Size,
|
||||||
@ -441,7 +440,8 @@ NTSTATUS SvcInstanceCreate(HANDLE ClientToken,
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
RegResult = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"" REGKEY, 0, KEY_READ, &RegKey);
|
RegResult = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"" LAUNCHER_REGKEY,
|
||||||
|
0, LAUNCHER_REGKEY_WOW64 | KEY_READ, &RegKey);
|
||||||
if (ERROR_SUCCESS != RegResult)
|
if (ERROR_SUCCESS != RegResult)
|
||||||
{
|
{
|
||||||
Result = FspNtStatusFromWin32(RegResult);
|
Result = FspNtStatusFromWin32(RegResult);
|
||||||
|
@ -21,7 +21,8 @@
|
|||||||
#include <winfsp/winfsp.h>
|
#include <winfsp/winfsp.h>
|
||||||
#include <shared/minimal.h>
|
#include <shared/minimal.h>
|
||||||
|
|
||||||
#define LAUNCHER_REGKEY "SYSTEM\\CurrentControlSet\\Services\\WinFsp.Launcher\\Services"
|
#define LAUNCHER_REGKEY "Software\\WinFsp\\Services"
|
||||||
|
#define LAUNCHER_REGKEY_WOW64 KEY_WOW64_32KEY
|
||||||
|
|
||||||
#define LAUNCHER_STOP_TIMEOUT 5500
|
#define LAUNCHER_STOP_TIMEOUT 5500
|
||||||
#define LAUNCHER_KILL_TIMEOUT 5000
|
#define LAUNCHER_KILL_TIMEOUT 5000
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
setlocal
|
setlocal
|
||||||
|
|
||||||
echo WINFSP INSTALLATION DIRECTORY
|
echo WINFSP INSTALLATION DIRECTORY AND LAUNCHER REGISTRATIONS
|
||||||
reg query HKLM\SOFTWARE\WinFsp /reg:32
|
reg query HKLM\SOFTWARE\WinFsp /s /reg:32
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
echo WINFSP DLL REGISTRATIONS
|
echo WINFSP DLL REGISTRATIONS
|
||||||
@ -12,10 +12,6 @@ reg query HKLM\SYSTEM\CurrentControlSet\Services\WinFsp.Np\NetworkProvider
|
|||||||
reg query HKLM\SYSTEM\CurrentControlSet\Services\EventLog\Application\WinFsp
|
reg query HKLM\SYSTEM\CurrentControlSet\Services\EventLog\Application\WinFsp
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
echo WINFSP LAUNCHER REGISTRATIONS
|
|
||||||
reg query HKLM\SYSTEM\CurrentControlSet\Services\WinFsp.Launcher\Services /s
|
|
||||||
echo.
|
|
||||||
|
|
||||||
echo WINFSP FSD CONFIGURATION AND STATUS
|
echo WINFSP FSD CONFIGURATION AND STATUS
|
||||||
sc query WinFsp
|
sc query WinFsp
|
||||||
sc qc WinFsp
|
sc qc WinFsp
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
setlocal
|
setlocal
|
||||||
setlocal EnableDelayedExpansion
|
setlocal EnableDelayedExpansion
|
||||||
|
|
||||||
set RegKey=HKLM\SYSTEM\CurrentControlSet\Services\WinFsp.Launcher\Services
|
set RegKey=HKLM\Software\WinFsp\Services
|
||||||
|
|
||||||
if not X%1==X-u (
|
if not X%1==X-u (
|
||||||
set unreg=0
|
set unreg=0
|
||||||
@ -16,9 +16,9 @@ if not X%1==X-u (
|
|||||||
if X!fscmdl!==X goto usage
|
if X!fscmdl!==X goto usage
|
||||||
if not exist !fsexec! goto notfound
|
if not exist !fsexec! goto notfound
|
||||||
|
|
||||||
reg add !RegKey!\!fsname! /v Executable /t REG_SZ /d !fsexec! /f
|
reg add !RegKey!\!fsname! /v Executable /t REG_SZ /d !fsexec! /f /reg:32
|
||||||
reg add !RegKey!\!fsname! /v CommandLine /t REG_SZ /d !fscmdl! /f
|
reg add !RegKey!\!fsname! /v CommandLine /t REG_SZ /d !fscmdl! /f /reg:32
|
||||||
if not X!fssecu!==X reg add !RegKey!\!fsname! /v Security /t REG_SZ /d !fssecu! /f
|
if not X!fssecu!==X reg add !RegKey!\!fsname! /v Security /t REG_SZ /d !fssecu! /f /reg:32
|
||||||
) else (
|
) else (
|
||||||
set unreg=1
|
set unreg=1
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ if not X%1==X-u (
|
|||||||
|
|
||||||
if X!fsname!==X goto usage
|
if X!fsname!==X goto usage
|
||||||
|
|
||||||
reg delete !RegKey!\!fsname! /f
|
reg delete !RegKey!\!fsname! /f /reg:32
|
||||||
)
|
)
|
||||||
|
|
||||||
exit /b 0
|
exit /b 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user