emrey
Posts: 12
Joined: Wed Nov 28, 2012 9:46 am

Call main jar with parameters on uninstalling

Hi friends,
I want to collect users uninstall information.so i added uninstall method in main class.if parameter "u" exist than main class run uninstall method.
ex. java - jar main.java for standart start
java -jar main.java -u to send uninstall info

i think i need custom action on uninstall stage.
how can i create custom action with our main jar. start main jar with parameter not necessarily.
calling main class at uninstall is enough for me.I am using enterprise edition AI.

Sorry for my English.Thanks for your help
Bogdan
Posts: 2791
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Call main jar with parameters on uninstalling

Hi,

Running a Java application as a custom action is a little bit tricky, but it can be done. The linked thread will give you more details.

Best regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
emrey
Posts: 12
Joined: Wed Nov 28, 2012 9:46 am

Re: Call main jar with parameters on uninstalling

Hi Bogdan,
I tried this(viewer.jpg).It runs successfuly but it is opening command line window.

So tried (aicustact.jpg) It is doenst run my jar.Everythings are same both of custom action.
you can see my attachments in ff.jpg(jar and bat file) and you can see my bat file(bat.jpg)

1-What is my mistake or error?
2-what is your suggestions?

Thank You
Attachments
ff.jpg
ff.jpg (46.58 KiB) Viewed 3157 times
aicustact.jpg
aicustact.jpg (143.69 KiB) Viewed 3157 times
viewer.jpg
viewer.jpg (138.19 KiB) Viewed 3157 times
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Call main jar with parameters on uninstalling

Hello,

Please keep in mind that, on uninstall, installation resources (e.g. resource files added in "Files and Folders" page) are removed during "Remove Resources" action group. So, can you schedule your custom action (on uninstall) before "Install Execution Stage -> Remove Resources" action group and see if the behavior still persist?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”