IExpress passing parameters to AppLaunched

Answered IExpress passing parameters to AppLaunched

  • Sunday, November 18, 2012 3:43 PM
     
     

    Is there a way to pass the filename (or just the path) of the exe to the bat file being launched in an exe created with IExpress?  I am trying to have the batch file check where the exe was run from.  If i pass %CD% as parameter to the bat file, it passes the path of the temp directory created by the exe, not the path the exe was run from.

    Thanks in advance!

All Replies

  • Sunday, November 18, 2012 5:13 PM
     
     

    These are not scripts but are directive files.  YOu need to post this question oin the platform forum for the OS you are running.

    Here are the docs for IExpress:  http://technet.microsoft.com/en-us/library/dd346760.aspx

    Note that the 'batch' files referred to are not commandline batch files but are IEXpress batch directive files which are a relative of the Setup 'inf' files.

    Here are all of the iexpress batch mode switches: http://technet.microsoft.com/en-us/library/dd346761.aspx

    Post further questions in the platform forum or in the IE forum for your version of IE.


    ¯\_(ツ)_/¯

  • Sunday, November 18, 2012 5:42 PM
     
     

    Assun=ming you are usign this to create a wrapper for a script fiel.

    Launch batch file is test.cmd

    script file is test.vbs

    the batch file would contain a line like:

    cscript test.vbs myargument1 myargument2


    ¯\_(ツ)_/¯

  • Sunday, November 18, 2012 6:02 PM
     
      Has Code

    I am using IExpress as a wrapper for a script file.  I have no problem passing arguments from the bat file to the vbs file.  Where I am having a problem is determining the path of the exe (created with IExpress) that calls the bat file.  Right now, the AppLaunched command for the exe is:

    cmd /c TestName.bat %CD%

     However, %CD% returns the temp folder that the exe created, not the path that the exe was run from.  I also tried %0, but the exe doesn't recognize it as anything other than text.

    cmd /c TestName.bat %0


    TestName.bat is (extra parameters included so I don't need to keep modifying it as I try new things):

    testname.vbs %0 %1 %2 %3


    Testname.vbs is:

    Set args = Wscript.Arguments
    msgbox args.count
    For Each arg In args
      msgbox arg
    Next



  • Sunday, November 18, 2012 6:16 PM
     
     Answered

    That is correct.

    This is not an exe it is an installer.  It is used fro installing custom versions of IE.  It has been co-opted to create an exe wrapper for a script.  It cannot do what you are trying to do.

    The installer technology does not allow the installed program know where the installer was launched from. 

    If you want an EXE wrpper that works as such you willneed to purchase one of the many script editors that include exe converters.


    ¯\_(ツ)_/¯

    • Marked As Answer by Puck3121 Sunday, November 18, 2012 7:23 PM
    •  
  • Sunday, November 18, 2012 7:23 PM
     
     
    I had a  feeling that was going to be the answer, but figured I would ask.  Thanks.