3 IF NOT EXIST %1\. GOTO Module_Error
5 SET OUTPUT=%1\OpenWith.SCP
7 SET FILE=%@FILEOPEN[supported_extensions.txt,read,t]
9 ECHO // "OpenWith" Windows Registry keys for extensions supported by %1 > %OUTPUT%
13 SET LINE=%@FILEREAD[%FILE%]
14 IF '%LINE%'=='' GOTO While_Read_File
15 IF '%@LEFT[1,%LINE%]'==';' GOTO While_Read_File
16 IF '%LINE%'=='**EOF**' GOTO End_Read_File
18 IF NOT '%@LEFT[1,%LINE%]'=='[' GOTO Register_Extension
20 SET MODULE=%@UPPER[%@WORD["[]",0,%LINE%]]
24 IF NOT '%MODULE%'=='%@UPPER[%1]' GOTO While_Read_File
26 ECHO // .%LINE% >> %OUTPUT%
27 ECHO RegistryItem gid_Regitem_OpenOffice_%LINE%_OpenWith_%1 >> %OUTPUT%
28 ECHO ParentID = PREDEFINED_HKEY_CLASSES_ROOT; >> %OUTPUT%
29 ECHO Subkey = ".%LINE%\OpenWithProgIDs"; >> %OUTPUT%
30 ECHO ModuleID = gid_Module_Prg_%1_Bin; >> %OUTPUT%
31 ECHO Name = "opendocument.%1Document.1"; >> %OUTPUT%
32 ECHO Value = "%PRODUCTNAME %PRODUCTVERSION"; >> %OUTPUT%
36 REM GOTO End_Read_File
40 SET ERROR=%@FILECLOSE[%FILE%]
49 ECHO Module %1 not found !