kdowney

Java post-install hooks

Wed Oct 22, 2003 4:00 pm

For the Java edition it would be nice to allow for post-install hooks so a run-once-only set-up wizard in Java could be kicked off automatically. Also, has anyone used JNI extensions with your Java native wrapper? I'm considering bundling JNIWrapper (http://www.jniwrapper.com/index.jsp) with my product. It lets you do things like COM integration, Java system tray icons, Win32 calls, Java registry access, etc. from Java code. And here's the real kicker: what if the post-install hook itself required that native library in the PATH? Would the installer be able to load the DLL?

Cata
Posts: 638
Joined: Thu Apr 10, 2003 7:37 am
Contact:  Website

Wed Oct 22, 2003 6:13 pm

Hello,

Post-install hooks are definitely on our todo list for a future version. Windows Installer supports them (they are called "custom actions") including a installation rollback capability in case of failure!

I am not familiar with JNIWrapper and I am don't know anybody using it, but I do not foresee any problems. Simply bundle the DLL with your app, and then, from Java, load the DLL and then call the object's methods.

Try it and if you encounter any problems let me know and we'll fix them.

Calling a custom action written in Java and which uses a native library should also "just work": this call is made after the actual install of the app completed succesfully.

But I do not think it is a very good idea: what if Java is not present on the user's machine? Then the call would fail and thus the install will fail. Also, it's a bit strange to have Windows Installer call Java then call a native DLL when you could have the custom action implemented directly a native DLL.

But I guess that there are cases when that is necessary. Advanced Installer should support them.

Best Regards,
Cata
Catalin Rotaru - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Feature Requests”