Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Batch file question  (Read 2997 times)

0 Members and 1 Guest are viewing this topic.

Allesok

    Topic Starter


    Starter

    • Experience: Experienced
    • OS: Windows 7
    Batch file question
    « on: March 02, 2015, 08:07:49 AM »
    I have the following file:
    REM Start Nitro PDF

    net start NitroPDFDriverCreatorReadSpool9
    net start NitroUpdateService
    start C:\_OFFICE\"Nitro PDF"\NitroPDF.exe

    timeout /t 10
    taskkill /fF /im "NLSSRV32.exe"
    net stop "Nalpeiron Licensing Sevice"

    cls
    exit

    How can I, instead of the timeout, make it wait until the application "NitroPDF.exe" is terminated?

    DaveLembke



      Sage
    • Thanked: 662
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: Batch file question
    « Reply #1 on: March 02, 2015, 11:46:43 AM »
    If you dont use the START for the
    Quote
    start C:\_OFFICE\"Nitro PDF"\NitroPDF.exe


    and just have

    C:\_OFFICE\"Nitro PDF"\NitroPDF.exe

    It should wait for the exe to end before moving on.

    Allesok

      Topic Starter


      Starter

      • Experience: Experienced
      • OS: Windows 7
      Re: Batch file question
      « Reply #2 on: March 02, 2015, 01:11:17 PM »
      Yes that works.
      But then for some reason NitrPDF starts and immediately wants to create a file NtroPDF.pdf, which stops with an error message.
      Only then does the application start properly.


      [attachment deleted by admin to conserve space]

      DaveLembke



        Sage
      • Thanked: 662
      • Certifications: List
      • Computer: Specs
      • Experience: Expert
      • OS: Windows 10
      Re: Batch file question
      « Reply #3 on: March 02, 2015, 01:17:06 PM »
      What error message? .... I see the pic here shows that its creating the pdf.

      Allesok

        Topic Starter


        Starter

        • Experience: Experienced
        • OS: Windows 7
        Re: Batch file question
        « Reply #4 on: March 02, 2015, 02:17:09 PM »
        This one:


        [attachment deleted by admin to conserve space]

        DaveLembke



          Sage
        • Thanked: 662
        • Certifications: List
        • Computer: Specs
        • Experience: Expert
        • OS: Windows 10
        Re: Batch file question
        « Reply #5 on: March 03, 2015, 06:28:39 AM »
        Is it a permissions issue where the destination to write the pdf to is not allowed? If it was attempting to write the pdf to root of c: or some other protected area this could also occur.