Announcement

Collapse
No announcement yet.

How to run a *.bat file from efs in ver 10.6 and ver 11

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to run a *.bat file from efs in ver 10.6 and ver 11

    Via efs I created a "ListSoundFiles.bat" file in the "\Formula Output" directory that creates a text file listing all the *.wav files in the "\Sounds" directory. It contains the following code:
    dir "c:\program files (x86)\esignal\sounds" /O:N /B > SoundFileList.txt
    .

    But I can't get the "shell32.dll" to execute the *.bat file. I'm using the following unsuccessfully to attemp it:
    PHP Code:
    var = new DLL("shell32.dll");
    function 
    main(){
    var 
    Handle     0;
    var 
    Operation     "open";
    var 
    FileName     "C:\\Program Files (x86)\\eSignal\\FormulaOutput\\ListSoundFiles.bat";
    var 
    Parameters     null;
    var 
    Directory     null;
    var 
    ShowCmd     1;

    d.call"run"HandleOperationFileNameParameters,DirectoryShowCmd );

    When I run the code I get the following error:
    PHP Code:
    SyntaxCheckline 10Internal ErrorDLL.call can not located(run
    This code runs fine as implemented in the efs found at: http://forum.esignalcentral.com/atta...=&postid=91494

    Also, will there be a way to run a *.bat file in ver 11 since shell32.dll will not be supported due to security concerns.

    Thanks,

    Wayne
    Last edited by waynecd; 01-26-2011, 11:44 PM.

  • #2
    Will ver 11 allow executing a *.bat file from within an efs?

    Maybe one of the ver 11 developers can answer this one:
    Will there be a way to run a *.bat file from within an efs in ver 11 since shell32.dll will not be supported due to security concerns.

    Wayne

    Comment


    • #3
      Hi Wayne,

      Unlike the example code, your filename did not have the '\\\' between the folders and file names. The '\\' is a String escape code sequence and I can see the lack of a double '\\\' causing problems.

      Steve

      Originally posted by waynecd
      I know very little about DLLs and shell32.dll so any help is appreciated.

      Correcting the "var FileName = ..." doesn't work either (just a typo when I posted):
      PHP Code:
      var FileName     "C:\\Program Files (x86)\\eSignal\\FormulaOutput\\ListSoundFiles.bat"
      Wayne

      Comment


      • #4
        Hi Steve,

        Good to hear from you.

        I actually used the "\\" but it seems that inside the "php" it deletes one. I just edited the post and it reads:
        var FileName = "C:\\Program Files (x86)\\eSignal\\FormulaOutput\\ListSoundFiles.bat" ;
        I also rechecked and ran the efs & efsLib I created. It uses the "\\" and I still get the error.

        Regards,

        Wayne

        Comment


        • #5
          For Ver 11 Developers

          Ref: http://forum.esignal.com/showthread....threadid=35349

          Will there be a way to execute a *.bat from within an efs study since shell32.dll will not be supported due to security concerns.

          Wayne

          Comment


          • #6
            Re: For Ver 11 Developers

            Hello Wayne,

            Originally posted by waynecd
            Ref: http://forum.esignal.com/showthread....threadid=35349

            Will there be a way to execute a *.bat from within an efs study since shell32.dll will not be supported due to security concerns.

            Wayne
            For the same security reasons as shell32, we do not have any plans to add functionality to execute .bat files from within EFS.
            Jason K.
            Project Manager
            eSignal - an Interactive Data company

            EFS KnowledgeBase
            JavaScript for EFS Video Series
            EFS Beginner Tutorial Series
            EFS Glossary
            Custom EFS Development Policy

            New User Orientation

            Comment

            Working...
            X