Command line
shell.exe registers Shell with Windows File Explorer, restarts Explorer, prepares the per-user
configuration and reports the state of an installation. Run it from the Shell program folder
(C:\Program Files\Nilesoft Shell\ by default, or the folder you extracted the portable version to).
shell -[options]
Options start with - or / and are not case-sensitive. Run shell -?
(or -help, -h) to show a short summary in a window. Without options (for example when you
double-click it), shell.exe opens the app,
NilesoftShellPro.exe in the same folder, or its own register and unregister window when the app isn't
there.
Registering
| -register (-r) | Register Shell so Explorer loads it. Without -user this writes to
HKEY_LOCAL_MACHINE for all users and needs an elevated command prompt. |
| -unregister (-u) | Remove the registration. Without -user this needs an elevated command prompt. |
| -user | With -register or -unregister: register for the current user only, under
HKCU\Software\Classes. No administrator rights are needed. The icon overlay is
machine-wide only and is skipped. If Shell is also registered for all users, the per-user registration
takes precedence for that user. |
| -treat (-t) | With -register on Windows 11: show the classic context menu, with Shell, instead of the
modern one. With -user the redirect is written under
HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}.
Since the November 2026 Windows 11 update (KB5132061) Windows uses a second key for its menu, so
-treat also writes an empty
HKCU\Software\Classes\CLSID\{51668040-5e31-4023-bbe3-149163bd80f1}\InprocServer32 for the
user who runs it. If the Windows 11 menu came back after that update, register again with
-treat and restart Explorer.
-unregister always removes the redirect it added. |
| -restart | Restart Windows Explorer for the current session so the change takes effect. Needs no administrator rights; other users' Explorer processes are not touched. |
| -silent (-s) | Do not show message boxes. Use it from scripts. |
-register, -unregister and -restart exit with code 0 on success and 1 on failure.
Per-user configuration
Shell reads its configuration from the first of these that exists:
- the file named by the
configvalue underHKCU\Software\Nilesoft\Shell(a relative path is taken from the program folder); %APPDATA%\Nilesoft\Shell\shell.nss;shell.nssin the program folder.
Imports are resolved relative to the importing file, so a per-user shell.nss uses the
imports folder next to it. None of the -config commands need administrator rights.
| -config:init [-force] | Copy shell.nss and the imports folder from the program folder to
%APPDATA%\Nilesoft\Shell. Existing files are kept unless -force (-f) is given;
the ones you never edited are first brought up to date as with -config:upgrade. |
| -config:upgrade [-take:<file>] | Bring the per-user copies of the shipped files (shell.nss and imports\**\*.nss) up to
date with the program folder. A copy that is a version shipped before (you never edited it) is replaced; a
missing file is added when your configuration imports it; a copy you edited is kept and listed. Line endings,
a BOM and the app's own import 'imports/settings-app*.nss' lines don't count as edits, and the
app's own files are never touched. All your files are saved as a snapshot in the backups folder
first (the app's Backups page). -take:<file>, for example
-take:imports/modify.nss, also replaces that file if you edited it. Prints JSON (below); exit code
0 if everything went through, 1 if not. With no personal configuration it does nothing. |
| -config:reset | Copy everything in %APPDATA%\Nilesoft\Shell to a backup-<timestamp>
folder inside it, then copy the default shell.nss and imports again, overwriting.
Other files are left in place. Nothing is overwritten if the backup fails. |
| -config:path | Print the full path of the configuration file in use. |
| -config:check <file> | Parse <file> and its imports with the same parser Explorer uses, without affecting the
running menu, and print the result as JSON. Exit code 0 if the configuration loads, 1 if it does not,
2 if no file is given. |
| -config:tree <file> -context:<where> [-sample:<path>] | Print the right-click menu for one place as JSON: the items from <file> and its imports,
and the items Windows and other programs add. <where> is file,
folder, drive, thispc, back, desktop or taskbar.
thispc is the This PC icon; it needs no -sample.
Read-only; it never shows a window. |
The output of -config:check looks like this. Errors stop the configuration from loading; warnings
(such as a missing import) do not.
{"ok":false,"root":"C:\\Users\\me\\AppData\\Roaming\\Nilesoft\\Shell\\shell.nss",
"errors":[{"file":"...\\imports\\theme.nss","line":12,"column":9,"message":"..."}],
"warnings":[]}
-config:tree is what the app's Menu map page reads. Windows' items are
read by building the menu off-screen for a sample file in %TEMP%\NilesoftShellPro\menu-map, or for the
path given with -sample; nothing is run. The output has ok, root,
context, sample, errors, warnings and tree.
tree holds shell (your items, each with its file and line), system (Windows'
and programs' items, with who added them and which rules hide, move or rename them), rules (each
modify and remove rule) and system_error.
The output of -config:upgrade lists the files by path relative to the configuration folder.
backup is the snapshot taken first, or null when nothing was written.
{"ok":true,"configDir":"C:\\Users\\me\\AppData\\Roaming\\Nilesoft\\Shell",
"installDir":"C:\\Program Files\\Nilesoft Shell","backup":"20261018-120000","backupDir":"...",
"updated":["imports/modify.nss"],"added":[],"modified_kept":["imports/theme.nss"],
"unchanged":["imports/goto.nss","shell.nss"],"failed":[],"error":null}
Status
| -status | Print one JSON object describing the installation. It only reads the registry and the file system and needs
no administrator rights. Exit code 0, or 1 if the output could not be written. It cannot be combined with
-config:*. |
The object contains:
version,elevated,installDiranddll(path, and whether it exists);registration.mode:none,user,machineorboth, plus the DLL each registration points at;win11: whether Windows 11 applies, whether the classic menu is active for this user, and the state of the machine and user redirects (absent,ours,foreignorinaccessible);config: the configuration file in use and where it was found (registry,appdata,installornone);userConfigDir: the per-user configuration folder.
Output
| -out:<file> | Write the output of -config:* and -status to <file> (UTF-8, replaced)
instead of standard output. |
shell.exe is a Windows program without a console of its own. Without -out, the output goes to
standard output when that is a pipe or a file, otherwise to the console the command was started from. Because
cmd.exe does not wait for Windows programs, that text can appear after the next prompt. Redirect it, use
-out, or start it with start /wait when the order matters.