APPPATHS — List, set, or remove AppPaths entries.

Syntax:
APPPATHS /D:dir /E /K /M /N:flags /P /Q /R:file /U /X /Y app.exe=fullpath

/D:dirspecify the default directory for app.exe
/Esuppress error messages
/Kshow counts
/Min HKEY_LOCAL_MACHINE (system-wide)
/N:flagsdisable features:
    C — disable highlight
    E — suppress error messages
    H — don’t show hive tags
    W — don’t check existence of files and directories
/Ppage output
/Qquietly
/R:fileread entries from a text file
/Uin HKEY_CURRENT_USER (per-user)
/Xexpand REG_EXPAND_SZ values
/Yyes to all prompts
app.exethe program to list/set/delete an entry for
fullpaththe complete pathname to the .EXE file

Any options must come before any app.exe on the command line.

This command can be used in four different ways: to list existing AppPaths entries, to create or change an entry, to remove an AppPaths entry, or to read and set entries from a file. Different options make sense in each of these modes.


To list AppPaths entries:

APPPATHS /K /M /P /U /X app.exe

The app.exe should end in .EXE; it may contain wildcards. If you do not specify an app.exe, APPPATHS will list all entries. If you do not specify either /M or /U, the default is to list entries from both keys.


To set an AppPaths entry:

APPPATHS /D:dir /E /M /Q /U /X /Y app.exe=fullpath

app.exe is required; it should end in .EXE. If you do not specify either /M or /U, the default is /M.

If you do not specify a /D:dir, the default is the program’s directory from fullpath.

Strings are written as type REG_SZ, unless you specify /X. With /X, if either your fullpath or your /D:dir contains at least one percent sign, then the string(s) with percent signs will be written as type REG_EXPAND_SZ.


To remove an AppPaths entry:

APPPATHS /E /M /Q /U /Y app.exe=

app.exe is required; it should end in .EXE. If you do not specify either /M or /U, the default is /M.


To read and set AppPaths entries from a file:

APPPATHS /E /M /Q /R:file /U /X /Y

The file should contain one entry per line, in the format:

app1.exe = fullname1
app2.exe = fullname2
app3.exe = fullname3

Blank lines and lines beginning with a semicolon are ignored. All other lines must be in app.exe=fullname format, or they will be flagged as errors.

When setting entries from a file, no attempt is made to canonicalize file and directory names, or to check whether they actually exist. Filenames are simply written to the registry as is.

All entries will be made in the same registry hive, according to /M or /U; if neither is specified, the default is /M. There is no provision for specifying default directories; the default directory for each entry will be fullname’s directory.

Strings are written as type REG_SZ, unless you specify /X. With /X, strings containing percent signs will be written as REG_EXPAND_SZ; strings without percent signs will still be created as REG_SZ.