中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-05 12:37
48,038 topics / 350,123 posts / today 1 new / 48,251 members
DOS批处理 & 脚本技术(批处理室) » How to automatically close the CMD window after opening a file
Printable Version  2,270 / 3
Floor1 charin Posted 2007-08-01 15:26
新手上路 Posts 2 Credits 6
I want to open a PDF file and automatically jump to a certain page. The function has been implemented, but every time a cmd window always pops up and must be closed until the PDF file is closed. The code is as follows:

a.bat
==========================
AcrPDF.bat 11
==========================

AcrPDF.bat
==========================
"D:\Program Files\Adobe\Acrobat 7.0\Acrobat\Acrobat.exe" /A "page=%1=OpenActions" "E:\Temp\Binder1.pdf"
==========================

How can I make the cmd window automatically close after opening the PDF file?
Using commands like start, cmd /c, etc. doesn't work

[ Last edited by bjsh on 2007-8-2 at 11:41 PM ]
Floor2 wudixin96 Posted 2007-08-01 15:37
银牌会员 Posts 931 Credits 1,928
Can't we just use one bat file? Why two?



Is this okay?
Floor3 ccwan Posted 2007-08-01 15:41
金牌会员 Posts 1,160 Credits 2,725 From 河北廊坊
I use Foxit Reader.exe
Code
start "" "D:\Text\Foxit Reader.exe" "d:\Office\Wonders of Office Software.pdf" /n 55
Can open page 55. Haven't used Acrobat, don't know the reason.

[ Last edited by ccwan on 2007-8-1 at 03:47 PM ]
Floor4 charin Posted 2007-08-01 16:16
新手上路 Posts 2 Credits 6
Thanks to the person above, putting start in the second .bat worked.

Originally posted by wudixin96 at 2007-8-1 15:37:
Can't you just use one bat file?

Why two?

I combined many papers, and of course I can't remember which page each article corresponds to, so I use each .bat file to record and pass parameters.
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023