Indigo Rose Software
  #1  
Old 09-26-2004
artistscope artistscope is offline
Indigo Rose Customer
 
Join Date: Sep 2004
Posts: 37
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);
Reply With Quote
  #2  
Old 09-27-2004
JXBURNS's Avatar
JXBURNS JXBURNS is offline
Forum Member
 
Join Date: Apr 2001
Location: Haverhill, Suffolk, UK
Posts: 333
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?

Quote:
result = Dialog.Message("Expanded Folder Name", SessionVar.Expand("%AppFolder%"), MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
John
Reply With Quote
  #3  
Old 09-27-2004
artistscope artistscope is offline
Indigo Rose Customer
 
Join Date: Sep 2004
Posts: 37
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.
Reply With Quote
  #4  
Old 09-27-2004
JXBURNS's Avatar
JXBURNS JXBURNS is offline
Forum Member
 
Join Date: Apr 2001
Location: Haverhill, Suffolk, UK
Posts: 333
How about following Brett's thread re checking this out in debug mode?

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

Rgds John
Reply With Quote
  #5  
Old 09-27-2004
artistscope artistscope is offline
Indigo Rose Customer
 
Join Date: Sep 2004
Posts: 37
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.
Reply With Quote
  #6  
Old 09-27-2004
JXBURNS's Avatar
JXBURNS JXBURNS is offline
Forum Member
 
Join Date: Apr 2001
Location: Haverhill, Suffolk, UK
Posts: 333
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
Reply With Quote
  #7  
Old 09-27-2004
artistscope artistscope is offline
Indigo Rose Customer
 
Join Date: Sep 2004
Posts: 37
Run JAR file on shutdown

This works on shutdown...

File.Open(SessionVar.Expand("%AppFolder%\\SecureIm agePro.jar"), "", SW_SHOWNORMAL);
Reply With Quote
  #8  
Old 09-27-2004
JXBURNS's Avatar
JXBURNS JXBURNS is offline
Forum Member
 
Join Date: Apr 2001
Location: Haverhill, Suffolk, UK
Posts: 333
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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can interrupt auto run application when running? pierre AutoPlay Media Studio 5.0 4 04-26-2004 06:10 AM
Running an Application After Rebooting Desmond AutoPlay Media Studio 5.0 Examples 0 09-26-2003 10:15 AM
Running my Application Only Once Desmond AutoPlay Media Studio 5.0 Examples 0 09-26-2003 09:46 AM
INFO: Dynamically Resizing an Application at Runtime Support AutoPlay Media Studio 4.0 Examples 0 10-21-2002 03:23 PM
HOWTO: Make an AutoPlay Application Expire Support AutoPlay Media Studio 4.0 Examples 0 10-09-2002 11:10 AM


All times are GMT -6. The time now is 05:14 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software