Can't close a program via .BAT after printing PDF document












0















I need to print copies of PDF document with a delay before printing each copy. I created a new task in the Windows' Task Scheduler and in the Actions tab of the Scheduler I selected my BAT file with the following code:



"C:Program Files (x86)Foxit SoftwareFoxit ReaderFoxitReader.exe" /t D:myfilename.pdf "HP" "hp psc 1300 series" USB001


When I run the task, empty FoxitReader window and the command promt window are being opened and my PDF document is being successfully printed.



The problem is both windows are not being closed programatically after printing and the next copy is not being printed until I manually closed the FoxitReader window (the command promt is being closed at the same time).



Yes, I remember that I print with a delay before each copy and my delay is just 1 minute. But the next copy is not being printed even after a few minutes without manual closing the windows.



I tried to add to my BAT file the line



taskkill /IM FoxitReader.exe


and



taskkill /IM FoxitReader.exe /F


but still the windows are not being closed and I don't see the taskkill line in the command promt window when the window is opened.



If I create another BAT file with the taskkill line and run it, the FoxitReader process is being ended. So I even tried to call separate BAT file by adding to my first BAT file the line



call "END.bat"


but the problem is still not resolved



I use Windows 7










share|improve this question



























    0















    I need to print copies of PDF document with a delay before printing each copy. I created a new task in the Windows' Task Scheduler and in the Actions tab of the Scheduler I selected my BAT file with the following code:



    "C:Program Files (x86)Foxit SoftwareFoxit ReaderFoxitReader.exe" /t D:myfilename.pdf "HP" "hp psc 1300 series" USB001


    When I run the task, empty FoxitReader window and the command promt window are being opened and my PDF document is being successfully printed.



    The problem is both windows are not being closed programatically after printing and the next copy is not being printed until I manually closed the FoxitReader window (the command promt is being closed at the same time).



    Yes, I remember that I print with a delay before each copy and my delay is just 1 minute. But the next copy is not being printed even after a few minutes without manual closing the windows.



    I tried to add to my BAT file the line



    taskkill /IM FoxitReader.exe


    and



    taskkill /IM FoxitReader.exe /F


    but still the windows are not being closed and I don't see the taskkill line in the command promt window when the window is opened.



    If I create another BAT file with the taskkill line and run it, the FoxitReader process is being ended. So I even tried to call separate BAT file by adding to my first BAT file the line



    call "END.bat"


    but the problem is still not resolved



    I use Windows 7










    share|improve this question

























      0












      0








      0








      I need to print copies of PDF document with a delay before printing each copy. I created a new task in the Windows' Task Scheduler and in the Actions tab of the Scheduler I selected my BAT file with the following code:



      "C:Program Files (x86)Foxit SoftwareFoxit ReaderFoxitReader.exe" /t D:myfilename.pdf "HP" "hp psc 1300 series" USB001


      When I run the task, empty FoxitReader window and the command promt window are being opened and my PDF document is being successfully printed.



      The problem is both windows are not being closed programatically after printing and the next copy is not being printed until I manually closed the FoxitReader window (the command promt is being closed at the same time).



      Yes, I remember that I print with a delay before each copy and my delay is just 1 minute. But the next copy is not being printed even after a few minutes without manual closing the windows.



      I tried to add to my BAT file the line



      taskkill /IM FoxitReader.exe


      and



      taskkill /IM FoxitReader.exe /F


      but still the windows are not being closed and I don't see the taskkill line in the command promt window when the window is opened.



      If I create another BAT file with the taskkill line and run it, the FoxitReader process is being ended. So I even tried to call separate BAT file by adding to my first BAT file the line



      call "END.bat"


      but the problem is still not resolved



      I use Windows 7










      share|improve this question














      I need to print copies of PDF document with a delay before printing each copy. I created a new task in the Windows' Task Scheduler and in the Actions tab of the Scheduler I selected my BAT file with the following code:



      "C:Program Files (x86)Foxit SoftwareFoxit ReaderFoxitReader.exe" /t D:myfilename.pdf "HP" "hp psc 1300 series" USB001


      When I run the task, empty FoxitReader window and the command promt window are being opened and my PDF document is being successfully printed.



      The problem is both windows are not being closed programatically after printing and the next copy is not being printed until I manually closed the FoxitReader window (the command promt is being closed at the same time).



      Yes, I remember that I print with a delay before each copy and my delay is just 1 minute. But the next copy is not being printed even after a few minutes without manual closing the windows.



      I tried to add to my BAT file the line



      taskkill /IM FoxitReader.exe


      and



      taskkill /IM FoxitReader.exe /F


      but still the windows are not being closed and I don't see the taskkill line in the command promt window when the window is opened.



      If I create another BAT file with the taskkill line and run it, the FoxitReader process is being ended. So I even tried to call separate BAT file by adding to my first BAT file the line



      call "END.bat"


      but the problem is still not resolved



      I use Windows 7







      batch-file cmd.exe scheduled-tasks






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 5 at 15:09









      sprsrsprsr

      1347




      1347






















          1 Answer
          1






          active

          oldest

          votes


















          0














          This is a documented bug in FoxIt Reader. See it here:
          http://forums.foxitsoftware.com/forum/portable-document-format-pdf-tools/foxit-reader/156463-printing-with-foxit-reader-using-command-line-command
          and here:
          http://forums.foxitsoftware.com/forum/portable-document-format-pdf-tools/foxit-reader/149617-print-pdf-via-command-line-and-exit-foxit-reader



          They do claim that FoxIt Reader 6.2 works, if you're up to trying that.
          Otherwise, there's http://www.columbia.edu/~em36/pdftoprinter.html and other options. (Check "print pdf from windows command line" in your favorite Web browser.)



          Sorry for the bad news, but hopefully something in this helps lessen the pain going forward.



          EDIT: I just had another idea. Try wmic's TERMINATE method. I think one of these should work to kill your foxit processes:



          wmic /interactive:off process where name="FoxitReader.exe" call terminate



          or



          wmic /interactive:off process where name="FoxitReader.exe" delete



          You may have to run it under elevated privileges. Good luck!






          share|improve this answer

























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1390913%2fcant-close-a-program-via-bat-after-printing-pdf-document%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            This is a documented bug in FoxIt Reader. See it here:
            http://forums.foxitsoftware.com/forum/portable-document-format-pdf-tools/foxit-reader/156463-printing-with-foxit-reader-using-command-line-command
            and here:
            http://forums.foxitsoftware.com/forum/portable-document-format-pdf-tools/foxit-reader/149617-print-pdf-via-command-line-and-exit-foxit-reader



            They do claim that FoxIt Reader 6.2 works, if you're up to trying that.
            Otherwise, there's http://www.columbia.edu/~em36/pdftoprinter.html and other options. (Check "print pdf from windows command line" in your favorite Web browser.)



            Sorry for the bad news, but hopefully something in this helps lessen the pain going forward.



            EDIT: I just had another idea. Try wmic's TERMINATE method. I think one of these should work to kill your foxit processes:



            wmic /interactive:off process where name="FoxitReader.exe" call terminate



            or



            wmic /interactive:off process where name="FoxitReader.exe" delete



            You may have to run it under elevated privileges. Good luck!






            share|improve this answer






























              0














              This is a documented bug in FoxIt Reader. See it here:
              http://forums.foxitsoftware.com/forum/portable-document-format-pdf-tools/foxit-reader/156463-printing-with-foxit-reader-using-command-line-command
              and here:
              http://forums.foxitsoftware.com/forum/portable-document-format-pdf-tools/foxit-reader/149617-print-pdf-via-command-line-and-exit-foxit-reader



              They do claim that FoxIt Reader 6.2 works, if you're up to trying that.
              Otherwise, there's http://www.columbia.edu/~em36/pdftoprinter.html and other options. (Check "print pdf from windows command line" in your favorite Web browser.)



              Sorry for the bad news, but hopefully something in this helps lessen the pain going forward.



              EDIT: I just had another idea. Try wmic's TERMINATE method. I think one of these should work to kill your foxit processes:



              wmic /interactive:off process where name="FoxitReader.exe" call terminate



              or



              wmic /interactive:off process where name="FoxitReader.exe" delete



              You may have to run it under elevated privileges. Good luck!






              share|improve this answer




























                0












                0








                0







                This is a documented bug in FoxIt Reader. See it here:
                http://forums.foxitsoftware.com/forum/portable-document-format-pdf-tools/foxit-reader/156463-printing-with-foxit-reader-using-command-line-command
                and here:
                http://forums.foxitsoftware.com/forum/portable-document-format-pdf-tools/foxit-reader/149617-print-pdf-via-command-line-and-exit-foxit-reader



                They do claim that FoxIt Reader 6.2 works, if you're up to trying that.
                Otherwise, there's http://www.columbia.edu/~em36/pdftoprinter.html and other options. (Check "print pdf from windows command line" in your favorite Web browser.)



                Sorry for the bad news, but hopefully something in this helps lessen the pain going forward.



                EDIT: I just had another idea. Try wmic's TERMINATE method. I think one of these should work to kill your foxit processes:



                wmic /interactive:off process where name="FoxitReader.exe" call terminate



                or



                wmic /interactive:off process where name="FoxitReader.exe" delete



                You may have to run it under elevated privileges. Good luck!






                share|improve this answer















                This is a documented bug in FoxIt Reader. See it here:
                http://forums.foxitsoftware.com/forum/portable-document-format-pdf-tools/foxit-reader/156463-printing-with-foxit-reader-using-command-line-command
                and here:
                http://forums.foxitsoftware.com/forum/portable-document-format-pdf-tools/foxit-reader/149617-print-pdf-via-command-line-and-exit-foxit-reader



                They do claim that FoxIt Reader 6.2 works, if you're up to trying that.
                Otherwise, there's http://www.columbia.edu/~em36/pdftoprinter.html and other options. (Check "print pdf from windows command line" in your favorite Web browser.)



                Sorry for the bad news, but hopefully something in this helps lessen the pain going forward.



                EDIT: I just had another idea. Try wmic's TERMINATE method. I think one of these should work to kill your foxit processes:



                wmic /interactive:off process where name="FoxitReader.exe" call terminate



                or



                wmic /interactive:off process where name="FoxitReader.exe" delete



                You may have to run it under elevated privileges. Good luck!







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Jan 5 at 16:24

























                answered Jan 5 at 16:00









                Bob60506Bob60506

                1014




                1014






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1390913%2fcant-close-a-program-via-bat-after-printing-pdf-document%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Сан-Квентин

                    8-я гвардейская общевойсковая армия

                    Алькесар