Script File - Batch Files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • merlinf14b
    Junior Member
    • Feb 2008
    • 3

    #1

    Script File - Batch Files

    Per the documentation it states that a Script file can only execute Executables.

    Is there anyway to have it launch a batch file or some other script file? (VBS etc.)
  • Ian (PassMark)
    Senior Member
    • Feb 2004
    • 822

    #2
    Yes, you can launch a batch file from a PerformanceTest script by including quotes around the batch file name.

    e.g. to a script file, Test.ptscript, add the following line
    EXECUTE "test.bat"

    Just about anything that would execute on the command line (like test.bat) should work in the EXECUTE script command. It must however be within quotes.

    Regards,
    Ian

    Comment

    • merlinf14b
      Junior Member
      • Feb 2008
      • 3

      #3
      Still having issues...

      I'm still seeing some qwirks when running these scripts.

      Here are my files and the code inside:

      Benchmark - Test.bat (c:\Benchmark - Test.bat)

      {CONTENTS}

      "C:\Program Files\PerformanceTest\pt.exe" /s c:\Test.ptscript

      {/CONTENTS}


      Test.ptscript (c:\Test.ptscript)

      {CONTENTS}

      EXECUTE "c:\windows\system32\notepad.exe"
      EXECUTE “c:\test.bat”
      EXECUTE "test2.bat"

      {/CONTENTS}


      test.bat (c:\test.bat)

      {CONTENTS}

      pause

      {/CONTENTS}


      test2.bat (c:\test2.bat)

      {CONTENTS}

      defrag c:

      {/CONTENTS}





      When I launch "Benchmark - Test.bat" it starts PerformanceTest 6.1, launches NotePad.exe, then beeps and stops. Test.bat and Test2.bat are not run.

      With PerformanceTest 6.1 already launched and I select the Test.ptscript to execute, it launches both NotePad.exe and Test2.bat, skipping Test.bat.

      Is there something I'm missing??

      Thanks for the help.

      Comment

      • Ian (PassMark)
        Senior Member
        • Feb 2004
        • 822

        #4
        PerformanceTest explicitly checks for 'normal' ASCII quotes, "", rather than “”. So I think just change the quotes.

        Regards,
        Ian

        Comment

        • merlinf14b
          Junior Member
          • Feb 2008
          • 3

          #5
          Thanks.

          Thank you.

          Comment

          Working...