Manage Windows services and drivers from a Far Manager panel: start, stop, pause, continue, restart, create, delete, reconfigure and change the logon account, locally or on a remote host.
Far does not need to run as administrator. Privileged operations are handed to a small elevated helper on demand, one UAC prompt per batch.
Andrew Grechkin's svcmgr plugin, revived. The last release was 2.3.15 in
2017 and its source was never published; the newest source that survived was
an unreleased 2.1.14 working copy from 2013, written for MinGW/GCC against
the Far 3.0 build 3064 API.
This tree takes that source, restores the functionality the 2.3.15 changelog describes, builds it with MSVC against the current build 6638 API, fixes what Windows 10/11 broke, and adds per-operation elevation.
Elevation (new). Every mutating operation is tried normally first and only
offers to elevate on ERROR_ACCESS_DENIED, so no prompt appears when you
already have the rights. A whole selection is retried in one helper run — twenty
services, one prompt. The helper handles one batch and exits rather than
lingering as an elevated process taking orders over IPC. Payloads can carry a
service account password, so they travel over a user-only named pipe rather than
the command line, and the plugin verifies the connecting process is genuinely
elevated and same-user first.
Far's own elevation prompt covers file system calls only — there is no elevation API for plugins — so service control has to ask for itself.
Restored from the 2.3.15 changelog.
- Alt-F7 search.
GetFilesWwas implemented but never exported, so Far could not extract a panel item for content search or View. It is exported now, and search mode no longer opens dialogs mid-scan. (SetFindListWis deliberately not exported - see below.) - Windows 10/11.
QUERY_SERVICE_CONFIGWfields are optional and modern Windows returns NULL for them — on a stock Windows 11, 458 of 459 drivers return a NULL account string, which the old code fed straight intostd::wstring. Enumeration also ignored the resume handle and assumed the sizing call always fails withERROR_MORE_DATA. - Language switching. Key bar and column captions were resolved once and cached; they are re-read now.
2.4.17. Alt-F7 in a normal file panel put an empty svcmgr panel on screen
instead of the search results. Far asks every plugin exporting SetFindList
whether it will host the results panel and the first to accept wins; svcmgr
accepted, then filtered its service list by the found file names, so nothing
matched. It now declines OPEN_FINDLIST and no longer exports SetFindListW,
leaving the job to a plugin that can show files. Four other entry points that
had no implementation (DeleteFilesW, MakeDirectoryW, ProcessHostFileW,
PutFilesW) are no longer exported either.
Also fixed. A static destruction order bug that crashed on plugin unload
(and would have taken Far down on exit), and unconditional logging to a hardcoded
path on the author's disk (now opt-in via SVCMGR_LOG).
Ported. MinGW/GCC → MSVC: the elvis operator, VLAs, GCC named-variadic
macros, std::binary_function. The Far API gap turned out small and additive.
Full history in dist/changelog.
Download the release archive, drop the svcmgr folder into
Far Manager\Plugins, restart Far. Keep svcmgr-elevator-x64.exe beside the
DLL — without it, privileged operations only work when Far is already elevated.
Requires Far Manager 3.0 build 6638 or newer, x64, on Windows 10 or 11.
Needs the Visual Studio Build Tools (MSVC) and CMake + Ninja, which ship with them.
build.cmd # output in dist/
install.cmd # copies into Far Manager\Plugins (elevated prompt)Tests — neither changes anything on the machine:
cmake --build build --target svcmgr-tests svcmgr-panel-testsvcmgr-tests enumerates the real service database, round-trips the elevation
wire format and drives the helper's protocol end to end. svcmgr-panel-test
drives the built DLL through Far's own call sequence against a stub host.
- Service dependencies can be viewed but not edited — the author's original
TODO. Both
set_dependenciescalls are commented out; the.lngfiles still carry unused captions (Depends,Select new dependency) for the editor that was planned as a second tab besideLogon as. - x64 only. The 2017 release also shipped an x32 build.
- Remote hosts don't benefit from elevation — connection credentials are deliberately not retained in memory, so the helper reaches a remote host as the current user.
- The live UAC prompt is not covered by tests, since approving it needs a human. Everything up to and including the helper's protocol is.
Original plugin © 2013 Andrew Grechkin — https://github.com/andrew-grechkin/main.
Russian .lng file by VictorVG @ VikSoft.Ru.
Licensed under the GNU GPL v3 (see dist/license.txt).
This is a modified version, redistributed with source and with the changes
described above, as the GPL requires.