Write Protection Commands Parent topic

Configure Write Protection List and Write Protection Exception List using the Command Line Interface by typing your command in the following format:
SLCmd.exe -p <admin_password> <command>   <parameter> <value>
The following table lists the available abbreviated forms of parameters.

Abbreviations and Uses

Parameter
Abbreviation
Use
writeprotection
wp
Manage the Write Protection feature
writeprotection-file
wpfi
Manage files in the Write Protection List
writeprotection-folder
wpfo
Manage folders in the Write Protection List
writeprotection-regvalue
wprv
Manage registry values and associated registry keys in the Write Protection List
writeprotection-regkey
wprk
Manage registry keys in the Write Protection List
writeprotection-file-exception
wpfie
Manage files in the Write Protection Exception List
writeprotection-folder-exception
wpfoe
Manage folders in the Write Protection Exception List
writeprotection-regvalue-exception
wprve
Manage registry values and associated registry keys in the Write Protection Exception List
writeprotection-regkey-exception
wprke
Manage registry keys in the Write Protection Exception List
The following tables list the commands, parameters, and values available.

Write Protection List File Commands

Command
Parameter
Value
Description
show
writeprotection
 
Display the entire Write Protection List
writeprotection-file
 
Display the files in the Write Protection List
For example, type:
SLCmd.exe -p <admin_password> show writeprotection-file
writeprotection-file-exception
 
Display the files in the Write Protection Exception List
For example, type:
SLCmd.exe -p <admin_password> show writeprotection-file-exception
writeprotection-folder
 
Display the folders in the Write Protection List
For example, type:
SLCmd.exe -p <admin_password> show writeprotection-folder
writeprotection-folder-exception
 
Display the folders in the Write Protection Exception List
For example, type:
SLCmd.exe -p <admin_password> show writeprotection-folder-exception
add
writeprotection-file
<file_path>
Add the specified file to the Write Protection List
For example, type:
SLCmd.exe -p <admin_password> add writeprotection-file archive.txt
Note
Note
The <file_path> value pattern matches from the end of the path toward the beginning of the path. For example, specifying userfile.txt matches c:\Windows\userfile.txt and c:\Temp\userfile.txt.
writeprotection-file-exception
-t <file_path> -p <process_path>
Add the specified file and a specific process path for that file to the Write Protection Exception List
For example, to add write access by a process named notepad.exe to a file named userfile.txt, type:
SLCmd.exe -p <admin_password> add writeprotection-file-exception -t userfile.txt -p notepad.exe
Note
Note
The -p and -t values pattern match from the end of the path toward the beginning of the path. For example, specifying userfile.txt matches c:\Windows\userfile.txt and c:\Temp\userfile.txt.
-t <file_path>
Add the specified file to the Write Protection Exception List
For example, to add write access by any process to a file named userfile.txt, type:
SLCmd.exe -p <admin_password> add writeprotection-file-exception -t userfile.txt
Note
Note
The -t value pattern matches from the end of the path toward the beginning of the path. For example, specifying userfile.txt matches c:\Windows\userfile.txt and c:\Temp\userfile.txt.
-p <process_path>
Add the specified process path to the Write Protection Exception List
For example, to add write access by a process named notepad.exe to any files, type:
SLCmd.exe -p <admin_password> add writeprotection-file-exception -p notepad.exe
Note
Note
The -p value pattern matches from the end of the process path toward the beginning of the path. For example, specifying notepad.exe matches c:\Windows\notepad.exe and c:\Temp\notepad.exe.
writeprotection-folder
[-r] <folder_path>
Add the specified folder(s) to the Write Protection List
For example, type:
SLCmd.exe -p <admin_password> add writeprotection-folder -r userfolder
Note
Note
Using the optional -r value includes the specified folder and related subfolders.
The <folder_path> value pattern matches from the end of the path toward the beginning of the path. For example, specifying userfile.txt matches c:\Windows\userfolder and c:\Temp\userfolder.
writeprotection-folder-exception
[-r] -t <folder_path> -p <process_path>
Add the specified folder and processes run from the specified path to the Write Protection Exception List
For example, to add write access by a process named notepad.exe to a folder and related subfolders at c:\Windows\System32\Temp, type:
SLCmd.exe -p <admin_password> add writeprotection-folder-exception -r -t c:\Windows\System32\Temp -p notepad.exe
Note
Note
Using the optional -r value includes the specified folder and related subfolders.
The -p and -t values pattern match from the end of the path toward the beginning of the path. For example, specifying userfile.txt matches c:\Windows\userfile.txt and c:\Temp\userfile.txt.
[-r] -t <folder_path>
Add the specified folder(s) to the Write Protection Exception List
For example, to add write access by any process to a folder at userfolder, type:
SLCmd.exe -p <admin_password> add writeprotection-folder-exception -r -t userfolder
Note
Note
Using the optional -r value includes the specified folder and related subfolders.
The -t value pattern matches from the last part of the folder path toward the beginning of the path. For example, specifying userfolder matches c:\Windows\userfolder and c:\Temp\userfolder.
-p <process_path>
Add processes run from the specified paths to the Write Protection Exception List
For example, to add write access by a process named notepad.exe to any folder, type:
SLCmd.exe -p <admin_password> add writeprotection-folder-exception -p c:\Windows\notepad.exe
Note
Note
The -p value pattern matches from the end of the process path toward the beginning of the path. For example, specifying notepad.exe matches c:\Windows\notepad.exe and c:\Temp\notepad.exe.
remove
writeprotection-file
<file_path>
Remove the specified file from the Write Protection List
For example, type:
SLCmd.exe -p <admin_password> remove writeprotection-file archive.txt
Note
Note
Specify the exact <file_path> originally specified in the corresponding add command.
writeprotection-file-exception
-t <file_path> -p <process_path>
Remove the specified file and process path from the Write Protection Exception List
For example, type:
SLCmd.exe -p <admin_password> remove writeprotection-file-exception -t userfile.txt -p notepad.exe
Note
Note
Specify the exact <file_path> and <process_path> originally specified in the corresponding add command.
-t <file_path>
Remove the specified file from the Write Protection Exception List
For example, type:
SLCmd.exe -p <admin_password> remove writeprotection-file-exception -t userfile.txt
Note
Note
The -t value pattern matches from the end of the path toward the beginning of the path. For example, specifying userfile.txt matches c:\Windows\userfile.txt and c:\Temp\userfile.txt.
-p <process_path>
Remove the specified process path from the Write Protection Exception List
For example, type:
SLCmd.exe -p <admin_password> remove writeprotection-file-exception -p notepad.exe
Note
Note
The -p value pattern matches from the end of the process path toward the beginning of the path. For example, specifying notepad.exe matches c:\Windows\notepad.exe and c:\Temp\notepad.exe.
writeprotection-folder
[-r] <folder_path>
Remove the specified folder(s) from the Write Protection List
For example, type:
SLCmd.exe -p <admin_password> remove writeprotection-folder -r c:\Windows
Note
Note
Using the optional -r value includes the specified folder and related subfolders.
Specify the exact <folder_path> and -r value originally specified in the corresponding add command.
writeprotection-folder-exception
[-r] -t <folder_path> -p <process_path>
Remove the specified folder and process path from the Write Protection Exception List
For example, type:
SLCmd.exe -p <admin_password> remove writeprotection-folder-exception -r -t c:\Windows\System32\Temp -p c:\Windows\notepad.exe
Note
Note
Using the optional -r value includes the specified folder and related subfolders.
Specify the exact <folder_path>, <process_path>, and -r value originally specified in the corresponding add command.
[-r] -t <folder_path>
Remove the specified folder(s) from the Write Protection Exception List
For example, type:
SLCmd.exe -p <admin_password> remove writeprotection-folder-exception -r -t userfolder
Note
Note
Using the optional -r value includes the specified folder and related subfolders.
The -t value pattern matches from the last part of the folder path toward the beginning of the path. For example, specifying userfolder matches c:\Windows\userfolder and c:\Temp\userfolder.
-p <process_path>
Remove the specified process path from the Write Protection Exception List
For example, type:
SLCmd.exe -p <admin_password> remove writeprotection-folder-exception -p c:\Windows\System32
Note
Note
The -p value pattern matches from the end of the process path toward the beginning of the path. For example, specifying notepad.exe matches c:\Windows\notepad.exe and c:\Temp\notepad.exe.

Write Protection List Registry Commands

Command
Parameter
Value
Description
show
writeprotection
 
Display the entire Write Protection List
writeprotection-regvalue
 
Display the registry values in the Write Protection List
writeprotection-regvalue-exception
 
Display the registry values in the Write Protection Exception List
writeprotection-regkey
 
Display the registry keys in the Write Protection List
writeprotection-regkey-exception
 
Display the registry keys in the Write Protection Exception List
add
writeprotection-regvalue
<path_of_registry_key> <registry_value>
Add the specified registry value and its related registry key to the Write Protection List
For example, to add the registry value of testvalue in the HKEY\test registry key to the Write Protection List, type:
SLCmd.exe -p <admin_password> add writeprotection-regvalue HKEY\test testvalue
writeprotection-regvalue-exception
-t <path_of_registry_key> <registry_value> -p <process_path>
Add the specified registry value and its related registry key and a specific process path for that value to the Write Protection Exception List
Note
Note
This command allows write access by the specified process to the specified registry values.
The -p value pattern matches from the end of the path toward the beginning of the path.
-t <path_of_registry_key> <registry_value>
Add the specified registry value and its related registry key to the Write Protection Exception List
Note
Note
This command allows write access by any process to the specified registry value.
-p <process_path>
Add the specified process to the Write Protection Exception List
Note
Note
This command allows write access by the specified process to any registry values.
The -p value pattern matches from the end of the process path toward the beginning of the path.
writeprotection-regkey
[-r] <path_of_registry_key>
Add the specified registry key to the Write Protection List
Note
Note
Using the optional -r value includes the specified registry key and related subkeys.
writeprotection-regkey-exception
[-r] -t <path_of_registry_key> -p <process_path>
Add the specified registry key and processes run from the specified path to the Write Protection Exception List
Note
Note
This command allows write access by the specified process to the specified registry keys.
Using the optional -r value includes the specified registry key and related subkeys.
The -p value pattern matches from the end of the process path toward the beginning of the path.
[-r] -t <path_of_registry_key>
Add the specified registry key to the Write Protection Exception List
Note
Note
This command allows write access by any process to the specified registry keys.
Using the optional -r value includes the specified registry key and related subkeys.
-p <process_path>
Add processes run from the specified paths to the Write Protection Exception List
Note
Note
This command allows write access by the specified process to any registry keys.
The -p value pattern matches from the end of the process path toward the beginning of the path.
remove
writeprotection-regvalue
<path_of_registry_key> <registry_value>
Remove the specified registry value from the Write Protection List
Note
Note
Specify the exact <path_of_registry_key> and <registry_value> originally specified in the corresponding add command.
writeprotection-regvalue-exception
-t <path_of_registry_key> <registry_value> -p <process_path>
Remove the specified registry value and process path from the Write Protection Exception List
Note
Note
Specify the exact <path_of_registry_key>, <registry_value>, and <process_path> originally specified in the corresponding add command.
The -p value pattern matches from the end of the path toward the beginning of the path.
-t <path_of_registry_key> <registry_value>
Remove the specified registry value from the Write Protection Exception List
-p <process_path>
Remove the specified process path from the Write Protection Exception List
Note
Note
The -p value pattern matches from the end of the path toward the beginning of the path.
writeprotection-regkey
[-r] <path_of_registry_key>
Remove the specified registry key from the Write Protection List
Note
Note
Specify the exact <path_of_registry_key> and -r value originally specified in the corresponding add command.
Using the optional -r value includes the specified registry key and related subkeys.
writeprotection-regkey-exception
[-r] -t <path_of_registry_key> -p <process_path>
Remove the specified registry key and process path from the Write Protection Exception List
Note
Note
Specify the exact <path_of_registry_key>, <process_path>, and -r value originally specified in the corresponding add command.
Using the optional -r value includes the specified registry key and related subkeys.
The -p value pattern matches from the end of the path toward the beginning of the path.
[-r] -t <path_of_registry_key>
Remove the specified registry key from the Write Protection Exception List
Note
Note
Using the optional -r value includes the specified registry key and related subkeys.
-p <process_path>
Remove the specified process path from the Write Protection Exception List
Note
Note
The -p value pattern matches from the end of the path toward the beginning of the path.