sbeckett
Posts: 35
Joined: Thu Aug 25, 2005 12:12 am

Haw can I force users to run the app from a shortcut?

I have a Java project I am successfully installing, but as we must pass command line parameters, I have to use a shortcut to launch the application.

To prevent users from accidentally trying to run the executable directly, I tried moving the executable to a subdirectory in the installation folder.

I moved both the 64K auto-created .exe file and also the associated .ini file to a subdirectory. (In the Files and Folders view, dragging the .exe to a new directory automatically moves the .ini file there, as well.)

When I try to launch the application, I always get an error stating the JVM cannot be found (we are bundling the JVM and I am installing to a machine with no pre-existing JVMs)

When I move the exe and ini back to the TARGETDIR location and run the shortcut, the application finds the JVM and runs fine.

I've tried playing with the working directory in the shortcut, but that doesn't appear to help.

How can I hide or otherwise obscure the .exe file so that users don't try to launch the application in a way that doesn't pass the command line params?
ciprian
Posts: 259
Joined: Thu Jul 14, 2005 12:56 pm
Location: Craiova, Romania
Contact: Website

Hi,


Unfortunately at this time there is no way to pass those parameters to the EXE other that the one you are using.

We will implement this feature (that will allow you to pass predefined parameters to the EXE) in a future release.

Regarding the JRE problem, I'm afraid that for the moment when you bundle a JRE with you product, the EXE and the INI file must be placed in the TARGETDIR location. We will fix this in a future release.

As for your question, I'm afraid that it is not possible to hide or obscure the EXE file.

However I would have another suggestion. Instead of passing those parameters to the exe file, you could use some properties which you can set during the installation process.

Here is how it could be done:

- Go to the "Java Products" page. Select the "Virtual Machine" pane.
- Click the [ ... ] button (besides the "JVM Parameters" field).
- In the newly appeared window use the [ New ] button to define the nave and the value for the properties.

Inside your java application you could use the System.getProperty() method to retrieve the values of those properties.

All the best,
Ciprian
Ciprian Burca
Advanced Installer Team
http://www.advancedinstaller.com
bruce
Posts: 15
Joined: Tue Aug 09, 2005 2:55 am
Location: Perth, Western Australia
Contact: Website

We will implement this feature (that will allow you to pass predefined parameters to the EXE) in a future release.
Has this feature been implemented yet? This would be useful for me too.

Thanks. :wink:
ciprian
Posts: 259
Joined: Thu Jul 14, 2005 12:56 pm
Location: Craiova, Romania
Contact: Website

Hi,

I'm afraid that this feature hasn't been implemented yet. If you want we can send you an email when this feature will be available.

In the meantime you can use the workaround presented above.


All the best,
Ciprian
Ciprian Burca
Advanced Installer Team
http://www.advancedinstaller.com
bruce
Posts: 15
Joined: Tue Aug 09, 2005 2:55 am
Location: Perth, Western Australia
Contact: Website

Yes, please notify me by e-mail when this feature becomes available.
ciprian
Posts: 259
Joined: Thu Jul 14, 2005 12:56 pm
Location: Craiova, Romania
Contact: Website

Hi,

Can you please provide a email adress so I can send you a notification email?

Regards,
Ciprian
Ciprian Burca
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Feature Requests”