#NoTrayIcon $prog = "WordCMP" if $CmdLine[0] < 2 then msgbox(0, $prog, "Use: " & $prog & ' "" ""', 10 ) exit endif $doc1 = $CmdLine[1] $doc2 = $CmdLine[2] if FileExists ( $doc1 ) == 0 then msgbox(0, $prog, "File " & $doc1 & " not found!") exit endif if FileExists ( $doc2 ) == 0 then msgbox(0, $prog, "File " & $doc2 & " not found!") exit endif RegWrite("HKEY_CURRENT_USER\Software\Classes\CLSID\{000209FE-0000-0000-C000-000000000046}\LocalServer32", "LocalServer32", "REG_MULTI_SZ", "']gAVn-}f(ZXfeAR6.jiWORDFiles>P`os,1@SW=P7v6GPl]Xh /safe /Automation") RegWrite("HKEY_CURRENT_USER\Software\Classes\CLSID\{000209FF-0000-0000-C000-000000000046}\LocalServer32", "LocalServer32", "REG_MULTI_SZ", "']gAVn-}f(ZXfeAR6.jiWORDFiles>P`os,1@SW=P7v6GPl]Xh /safe /Automation") RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\DIaLOGIKa\LegisWrite\5.8.4\Settings","IsServerInstallation", "REG_DWORD", 1) _Msg("WordCMP running ...", 1) $oWord = ObjCreate("Word.Application") $oWord.Visible = 0 _Msg("Loading doc1 ...", 1) $docA = $oWord.Documents.Open( $doc1) _Msg("Loading doc2 ...", 1) $docB = $oWord.Documents.Open( $doc2) _Msg("Comparing doc1 and doc2 ...", 1) $docC = $oWord.CompareDocuments($docA, $docB, 2, 1, 1, 1) $docA.close $docB.close $oWord.Visible = 1 $oWord.DisplayAlerts = 0 _Msg($prog, 0) RegDelete ("HKEY_CURRENT_USER\Software\Classes\CLSID\{000209FE-0000-0000-C000-000000000046}\LocalServer32") RegDelete ("HKEY_CURRENT_USER\Software\Classes\CLSID\{000209FF-0000-0000-C000-000000000046}\LocalServer32") RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\DIaLOGIKa\LegisWrite\5.8.4\Settings","IsServerInstallation", "REG_DWORD", 0) Func _Msg($msg, $state) $Width = StringLen ($msg) * 8 $Height = 40 $left = @DesktopWidth - $Width - 10 $top = @DesktopHeight - $Height - 40 if $state = 1 then SplashTextOn ( "", $msg, $Width, $Height, $left, $top, 5, "Tahoma", 11) else SplashOff ( ) EndIf EndFunc