summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiep Kroonenberg <siepo@cybercomm.nl>2008-10-09 21:15:38 +0000
committerSiep Kroonenberg <siepo@cybercomm.nl>2008-10-09 21:15:38 +0000
commit258b5e811409ba7a78f9149cc26ec2b68c3983c3 (patch)
treedbfad74f80fd44e7f33d002b8d1ac09549a7dd8e
parenteb9cf9c91fd041fe2ee510d0bf3acfc42431d5b2 (diff)
Fixed Adobe Reader detection
git-svn-id: svn://tug.org/texlive/trunk@10899 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/tlpkg/doc/tnc_config.vbs47
1 files changed, 20 insertions, 27 deletions
diff --git a/Master/tlpkg/doc/tnc_config.vbs b/Master/tlpkg/doc/tnc_config.vbs
index 73e8f123a55..f6d366727c1 100644
--- a/Master/tlpkg/doc/tnc_config.vbs
+++ b/Master/tlpkg/doc/tnc_config.vbs
@@ -164,43 +164,36 @@ If bFirstConfig Then
Else
Err.clear
bAdobe = True
- sTmp = oWsh.RegRead("HKCR\.pdf\")
- If ((Err.number>0) Or (sTmp="")) Then
+ sTmp = oWsh.RegRead("HKCR\AcroExch.Document\Shell\Open\Command\")
+ If Err.number>0 Then
bAdobe = False
Err.clear
Else
- 'wscript.echo ".pdf: " & sTmp
- sTmp = oWsh.RegRead("HKCR\" & sTmp & "\Shell\Open\Command\")
- If Err.number>0 Then
+ 'wscript.echo "open command:" & vbnewline & stmp & vbnewline
+ If InStr(sTmp, """") = 1 Then
+ sTmp = Mid(sTmp, 2)
+ End If
+ i = InStr(sTmp, ".exe")
+ If i=0 Then
bAdobe = False
- Err.clear
Else
- 'wscript.echo "open command:" & vbnewline & stmp & vbnewline
- If InStr(sTmp, """") = 1 Then
- sTmp = Mid(sTmp, 2)
- End If
- i = InStr(sTmp, ".exe")
- If i=0 Then
+ sAdobe = Mid(sTmp, 1, InStr(sTmp, ".exe")+3)
+ 'wscript.echo "reader:" & sAdobe
+ Err.clear
+ oTmp = oFS.GetFile(sAdobe)
+ If Err.number>0 Then
bAdobe = False
- Else
- sAdobe = Mid(sTmp, 1, InStr(sTmp, ".exe")+3)
- 'wscript.echo "reader:" & sAdobe
Err.clear
- oTmp = oFS.GetFile(sAdobe)
- If Err.number>0 Then
- bAdobe = False
- Err.clear
- 'wscript.echo sadobe & " not a file"
- End If
+ 'wscript.echo sadobe & " not a file"
End If
End If
End If
- If bAdobe Then
- i = MsgBox( "Use Adobe Reader/Acrobat instead of SumatraPDF?", _
- vbYesNo+vbQuestion, "PDF viewer")
- If i = vbNo Then
- bAdobe = False
- End If
+End If
+If bAdobe Then
+ i = MsgBox( "Use Adobe Reader/Acrobat instead of SumatraPDF?", _
+ vbYesNo+vbQuestion, "PDF viewer")
+ If i = vbNo Then
+ bAdobe = False
End If
End If
'If badobe Then