How to fix “ERROR: The system was unable to find the specified registry key or value.” when running a batch file

You’re not deleting a registry key named: You’re deleting a registry value, named: Functions which exists under the key named HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Cryptography\Configuration\SSL\00010002. To perform the task you therefore need to use the correct syntax: You would also need to run the script ‘as Administrator’, to prevent an Access is denied message.

wget not recognized as internal or external command

wget is a third-party program that doesn’t come bundled with Windows, so you need to explicitly install it in order to use it. You can find (one of) the Windows versions here: You will need to add the path of the wget.exe file to your PATH environment variable in order to call the executable as in the batch file above …

Read more

Batch file to copy files from one folder to another folder

xcopy.exe is definitely your friend here. It’s built into Windows, so its cost is nothing. Just xcopy /s c:\source d:\target You’d probably want to tweak a few things; some of the options we also add include these: /s/e – recursive copy, including copying empty directories. /v – add this to verify the copy against the original. slower, but for …

Read more

Batch file to copy directories recursively

Look into xcopy, which will recursively copy files and subdirectories. There are examples, 2/3 down the page. Of particular use is: To copy all the files and subdirectories (including any empty subdirectories) from drive A to drive B, type: xcopy a: b: /s /e

What is the current directory in a batch file?

From within your batch file: %cd% refers to the current working directory (variable) %~dp0 refers to the full path to the batch file’s directory (static) %~dpnx0 and %~f0 both refer to the full path to the batch directory and file name (static). See also: What does %~dp0 mean, and how does it work?