Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2004
    Posts
    89

    Running an application on exit

    Am trying to start an executable jar file on exit and not succeeding. Have tried the following but still no result...

    -- These actions are performed when the Cancel button is clicked.
    File.Open(SessionVar.Expand("%AppFolder%\\SecureIm agePro.jar"), "", SW_SHOWNORMAL);

    -- These actions are performed when the Cancel button is clicked.
    result = File.Run(SessionVar.Expand("%AppFolder%\\SecureIma gePro.jar"), "", "", SW_SHOWNORMAL, false);

  2. #2
    Join Date
    Apr 2001
    Location
    Haverhill, Suffolk, UK
    Posts
    360
    The second looks OK to me.

    I assume you have actually tried running the file manually from whatever the %AppFolder% is expanded to your SUF7 session variables?

    Have you verified that %AppFolder% does actually expand to what you expect?

    result = Dialog.Message("Expanded Folder Name", SessionVar.Expand("%AppFolder%"), MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
    John

  3. #3
    Join Date
    Sep 2004
    Posts
    89

    No action

    The jar file runs ok manually.

    Have created a setup log file and the routine doesn't appear, not even mention of a failure.

  4. #4
    Join Date
    Apr 2001
    Location
    Haverhill, Suffolk, UK
    Posts
    360
    How about following Brett's thread re checking this out in debug mode?

    http://www.indigorose.com/forums/sho...9664#post39664

    Rgds John

  5. #5
    Join Date
    Sep 2004
    Posts
    89

    Runs EXE but not JAR

    Changed it to run on shutdown from the Actions menu instead... the following started ok...

    result = File.Run(SessionVar.Expand("%AppFolder%\\test.exe" ), "", "", SW_SHOWNORMAL, false);

    But it wouldn't work opening the jar file which is executable and runs on all manual commands.

    Thanks for the Debug routine. Unfortunately I missed the related debug message as it closes when the installer exits.

  6. #6
    Join Date
    Apr 2001
    Location
    Haverhill, Suffolk, UK
    Posts
    360
    I think the key may well be what it states in the Help file for FILE.RUN:

    "The path to the executable (.exe) file."

    Note the specific use of the ".EXE"..

    Something for IR to answer me thinks.. Can't test myself at the moment as in middle of editing 2500+ registry commands..

    John

  7. #7
    Join Date
    Sep 2004
    Posts
    89

    Run JAR file on shutdown

    This works on shutdown...

    File.Open(SessionVar.Expand("%AppFolder%\\SecureIm agePro.jar"), "", SW_SHOWNORMAL);

  8. #8
    Join Date
    Apr 2001
    Location
    Haverhill, Suffolk, UK
    Posts
    360
    Assuming you are running a NT-based OS you probably need to make sure the environment variable includes .JAR e.g.

    set PATHEXT=.EXE;.BAT;.CMD;.JAR

    This I believe forces Windows to run the JAVA command to then run the .JAR file.

    John

Similar Threads

  1. How can interrupt auto run application when running?
    By pierre in forum AutoPlay Media Studio 5.0
    Replies: 4
    Last Post: 04-26-2004, 05:10 AM
  2. Running an Application After Rebooting
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 09-26-2003, 09:15 AM
  3. Running my Application Only Once
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 09-26-2003, 08:46 AM
  4. INFO: Dynamically Resizing an Application at Runtime
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-21-2002, 02:23 PM
  5. HOWTO: Make an AutoPlay Application Expire
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-09-2002, 10:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts