Autorun
If
cmd.exe is started
without the
/D
option, it executes the commands that are listed in the
Autorun
value first.
If the value contains the name of a
batch file, extreme care needs to be taken that this batch file does not contain any command that starts another instance of
cmd.exe
, such as the
for /f "usebackq" …
construct. Otherwise, cmd.exe is instantiated recursively.
Should that happen nevertheless, the created cmd.exe
processes might be killed with a
taskkill /im cmd.exe /f
.
CompletionChar / PathCompletionChar
Setting it to 9 for both allows to complete file and directory with the tabulator.
The following
PowerShell script sets the completion characters for both, files and directories, to the tabulator character:
$regPath = 'HKCU:\Software\Microsoft\Command Processor'
if (! (test-path $regPath) ) {
write-output "$regPath does not exist, creating"
$eatMe = new-item -path $regPath
}
$eatMe = new-itemProperty -path $regPath -name CompletionChar -value 9 -propertyType DWord
$eatMe = new-itemProperty -path $regPath -name PathCompletionChar -value 9 -propertyType DWord