Solved Open PDF File From Win8.1 32 Bit DOS Command Line Prompt

Tom Yuhas

New Member
Messages
3
I need to be able to open PDF files from Win 8 32 bit DOS Command Line to complete a DOS macro for a document management database I've used for 20+ years.

On XP Systems I simply have macro grab file name from database and type >Start "Path\filename.pdf"

Does Windows 8.1 have a similar capability? I'm using ClassicShell.

I understand that Start now opens another instance of cmd, but is there a work around to launch PDFs from command prompt and hand back control to DOS after file is open?

Thank you,
Tom
 

My Computer

System One

  • OS
    Win 8.1 Pro
It works for me if I call the program and pass it the PDF to open:

Code:
start "C:\Program Files (x86)\Foxit Software\Foxit Reader\FoxitReader.exe" ""C:\Program Files (x86)\Foxit Software\Foxit Reader\stamps\en_us\Sign Here\Accepted.pdf""
Echo PDF is open and batch file has control back

WHen I run the above batch file, the PDF opens and if I leave it open and switch to teh Command Prompt windows I see the Echo output indicating it got control back.
 

My Computer

System One

  • OS
    Windows 10 Pro X64
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Lenovo IdeaCenter K450
    CPU
    Intel Quad Core i7-4770 @ 3.4Ghz
    Motherboard
    Lenovo
    Memory
    16.0GB PC3-12800 DDR3 SDRAM 1600 MHz
    Graphics Card(s)
    Intel Integrated HD Graphics
    Sound Card
    Realtek HD Audio
    Monitor(s) Displays
    HP h2207
    Screen Resolution
    1680x1050@59Hz
    Hard Drives
    250GB Samsung EVO SATA-3 SSD;
    2TB Seagate ST2000DM001 SATA-2;
    1.5TB Seagate ST3150041AS SATA
    PSU
    500W
    Keyboard
    Wired USB
    Mouse
    Wired USB
    Internet Speed
    3GB Up, 30GB Down
    Browser
    SeaMonkey
    Antivirus
    Windows Defender; MBAM Pro
    Other Info
    UEFI/GPT
    PLDS DVD-RW DH16AERSH
I can duplicate your batch file call but it will only launch from windows, not from command line prompt.

In other words, I created batch file following your instructions, but batch file will not launch pdf from command line c:\batch1.bat call.

Am I missing something?

Thank you.
Tom
 

My Computer

System One

  • OS
    Win 8.1 Pro
Rich,

I found my problem -- I'm using WordPerfect Shell DOS command to try to run batch file (or launch file directly as I was able to in the past with XP platform).

As you correctly pointed out, I can launch any windows program directly from Win8 cmd command prompt -- so I now have a work around.

Thank you very much for your help.

Tom
 

My Computer

System One

  • OS
    Win 8.1 Pro
Great, glad you figured it out. I was scratching my head and going nowhere.
 

My Computer

System One

  • OS
    Windows 10 Pro X64
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Lenovo IdeaCenter K450
    CPU
    Intel Quad Core i7-4770 @ 3.4Ghz
    Motherboard
    Lenovo
    Memory
    16.0GB PC3-12800 DDR3 SDRAM 1600 MHz
    Graphics Card(s)
    Intel Integrated HD Graphics
    Sound Card
    Realtek HD Audio
    Monitor(s) Displays
    HP h2207
    Screen Resolution
    1680x1050@59Hz
    Hard Drives
    250GB Samsung EVO SATA-3 SSD;
    2TB Seagate ST2000DM001 SATA-2;
    1.5TB Seagate ST3150041AS SATA
    PSU
    500W
    Keyboard
    Wired USB
    Mouse
    Wired USB
    Internet Speed
    3GB Up, 30GB Down
    Browser
    SeaMonkey
    Antivirus
    Windows Defender; MBAM Pro
    Other Info
    UEFI/GPT
    PLDS DVD-RW DH16AERSH
Back
Top