Using REG.EXE, built into Windows XP, Windows Server 2003, and later, or installed on Windows 2000 from the Support Tools folder of of the Windows 2000 CD-ROM, I have scripted AssocList.bat to generate a semi-colon delimited file containing:

Assoc;Ftype;Action;CommandString

Where:

<b>Assoc</b>         is the file extension, like <b>.txt</b>. Two special extensions are <b>Directory</b> and <b>Folder</b>.

<b>Ftype</b>         is the registry sub-key in the <b>HKCR</b> key that houses the <b>Action</b> definition, like <b>txtfile</b>.

<b>Action</b>        is the command that appears on the context menu, like <b>Open</b>, <b>Print</b>, and <b>Edit</b>.

<b>CommandString</b> defines the program and parameter(s) required to perform the <b>Action</b>, like <b>%SystemRoot%\system32\NOTEPAD.EXE %1</b>.
The syntax for using AssocList.bat is:

AssocList \[ComputerName\]

Where ComputerName is optional, defaulting to the local computer.

The output is written to AssocList_<ComputerName>.txt in the current directory.

AssocList.bat contains:

@echo off
setlocal ENABLEDELAYEDEXPANSION
set comp=%1
if "%comp%" EQU "" set comp=%ComputerName%
set comp=%comp:"=%
set comp=%comp:\=%
set file=AssocList_%comp%.txt
if exist %file% del /q %file%
set comp=\\%comp%
set assoc=Directory
set ftype=Directory
set ftk="%comp%\HKLM\Software\Classes\Directory\Shell"
call :quiet1>nul 2>&1
set assoc=Folder
set ftype=Folder
set ftk="%comp%\HKLM\Software\Classes\Folder\Shell"
call :quiet1>nul 2>&1
call :quiet>nul 2>&1
endlocal
goto :EOF
:quiet
for /f "Tokens=4 Delims=\" %%a in ('reg query "%comp%\HKLM\SOFTWARE\Classes"^|find "\."') do (
 set assoc=%%a
 set key=HKLM\SOFTWARE\Classes\%%a
 for /f "Tokens=3*" %%b in ('reg query "%comp%\!key!" /Ve^|find "REG_"') do (
  set ftype=%%c
 )
 set ftk="%comp%\HKLM\Software\Classes\!ftype!\Shell"
 for /f "Tokens=*" %%d in ('reg query !ftk!^|find /i "Shell"') do (
  for /f "Tokens=5* Delims=\" %%x in ('@echo %%d') do (
   set command=%%y
   set ftl="%comp%\HKLM\Software\Classes\!ftype!\Shell\%%y\command"
   for /f "Tokens=3*" %%i in ('reg query !ftl! /Ve^|find "REG_"') do (
    set prog=%%j
    @echo !assoc!;!ftype!;!command!;!prog!>>%file%
   )
  )
 )
)
goto :EOF
:quiet1
for /f "Tokens=*" %%d in ('reg query %ftk%^|find /i "Shell"') do (
 for /f "Tokens=5* Delims=\" %%x in ('@echo %%d') do (
   set command=%%y
   set ftl="%comp%\HKLM\Software\Classes\%ftype%\Shell\%%y\command"
   for /f "Tokens=3*" %%i in ('reg query !ftl! /Ve^|find "REG_"') do (
    set prog=%%j
    @echo %assoc%;%ftype%;!command!;!prog!>>%file%
   )
 )
)