Haven't been here in years - but - now here.
Background: I got a virus and had to wipe my hard drive and install Windows 10 (latest version). I must say Win 10 has changed since I bought my USB Stick. (Downloaded latest version and installed that using my key.) So everything had to be wiped and now I'm reinstalling everything. I have run into two problems which are similar.
First problem: When I try to run a batch file to modify the registry I get:
C:\Windows\system32\cmd.exe /c (da)
S:\Downloads\Utilities\NIR Software\NirCMD>■e
'■e' is not recognized as an internal or external command,
operable program or batch file.
shell returned 1
Hit any key to close this window...
"d.bat" is a small batch file which I reduced to these two commands:
echo
cls
That's it!
My second problem is I have a registry file which worked under Windows 7. It is:
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\SystemFileAssociations\Drive.CDROM\shell\Open CD/DVD Tray\command]
[-HKEY_CLASSES_ROOT\SystemFileAssociations\Drive.CDROM\shell\Close CD/DVD Tray\command]
[-HKEY_CLASSES_ROOT\SystemFileAssociations\Drive.CDROM\shell\Open CD/DVD Tray]
[-HKEY_CLASSES_ROOT\SystemFileAssociations\Drive.CDROM\shell\Close CD/DVD Tray]
[HKEY_CLASSES_ROOT\SystemFileAssociations\Drive.CDROM\shell]
@="none"
[HKEY_CLASSES_ROOT\SystemFileAssociations\Drive.CDROM\shell\Close CD/DVD Tray]
@="Close CD/DVD Tray"
"icon"="imageres.dll,-30"
[HKEY_CLASSES_ROOT\SystemFileAssociations\Drive.CDROM\shell\Close CD/DVD Tray\command]
@="REG_EXPAND_SZ:%SystemRoot%\System32\cmd.exe /c c:\program_files\nircmd-x64\nircmd.exe cdrom close \"%1\" %*"
[HKEY_CLASSES_ROOT\SystemFileAssociations\Drive.CDROM\shell\Open CD/DVD Tray]
@="Open CD/DVD Tray"
"icon"="imageres.dll,-30"
[HKEY_CLASSES_ROOT\SystemFileAssociations\Drive.CDROM\shell\Open CD/DVD Tray\command]
@="REG_EXPAND_SZ:%SystemRoot%\System32\cmd.exe /c c:\program_files\nircmd-x64\nircmd.exe cdrom open \"%1\" %*"
When the above runs (this is an alternative to problem #1) what I get is that the "command" line's "(Default)" entry is blank. I have run this as admin and as a user - same result. Ideas? (See image)
Snapshots of registry information from the above script. Note the icons and names get entered but not the command itself.
https://www.dropbox.com/s/4an0l91qmf40mj2/2020-08-30_145526.png?dl=0
https://www.dropbox.com/s/mnizx5vrc39dzc3/2020-08-30_145540.png?dl=0
https://www.dropbox.com/s/gpzr638sgxsnjsj/2020-08-30_145610.png?dl=0
https://www.dropbox.com/s/jc0umvp3zq5q5sp/2020-08-30_145622.png?dl=0
Ok. The answer to the above questions are : I do NOT know.
After a week where none of the above worked at all, today - all of a sudden - the commands are working. So - I have no idea why they started working but they do.
Yet more weirdness from Windows. Yep. What can I say?