Tuesday, June 24, 2008

Adding image to Add/Remove program

You might have noticed that when your installer is created using InstallAnywhere, the default icon is shown (probably ZeroG icon). To customize your product according to the look and feel of your comany its very important to add a customized icon of your company that is product specific.
This task is very easy to achieve, you just need to 'Set Windows Registry Entry' action to do it.
In your uninstaller registry key (eg: \\HKLM\Software\Microsoft\Windows\CurrentVersion\uninstall\MyProduct) create an entry named "DisplayIcon" with the value set to the full path to the icon you want to use. This means you'll need to install the icon file with your application.
There's also a host of other keys that IA doesn't automatically generate that you can manually create.
If you need any more detail pertaining to the issue browse through MSDN site for more details.

2 comments:

Doom said...

For some of the applications, I only see the name of the executable, a comma and a 0 (e.g., firefox.exe,0) where you mention the full icon path should go. Is that because other installers allow you to embed the icon?

Unknown said...

Hey Jen,
Let me understand your problem,

As per my understanding, you have a installation project where some .jar file are mentioned as part of the project ($USER_INSTALL_DIR$) since these .jar file are build every time and are dynamic in nature (meaning some are there and some are not there every time). This means IA is throwing "Resource missing error when the project is build or opened in the designer"

"Is this what you intend to say" If this is the case open IA and follow these steps
1. Create a dummy project after clicking new project
2. Switch to Advanced Designer
3. Click on Edit -->Preferences menu
4. The third or Fourth option would be verify installation resources while loading
5. Disable the resource verification check there with the help of Radio Button.
6. Now open your project (it would not complain of missing resources)

One more question over here

String classPath = ip.substitute("$IA_CLASSPATH$"
);
File folder = new File("C:/Projects/projectCLASSPATH/Install/dist");
File[] listOfFiles = folder.listFiles();

From where are you getting this PATH in bold (C:/Projects/projectCLASSPATH/Install/dist) And why is this location a static one?

You are assuming that all your .jar files would be present in this location at all targeted computers and hence you are adding every file inside this directory to your classpath variable. Please help me understand this; is this just an example location or its a hardcoded static location to look for every time?

May be I have completely misunderstood your problem please forgive me for that.

If your case is different; please give me an overview of your installation project what it does and; how files and folders feed into it (speed folder or DIM). This will help me understand the exact issue.

P.S .LAX files are used internally by IA while loading, building or performing any actions. It contains information such as classpath, ANT path etc. If you are trying to have a third party functionality inside your installation logic copy all your .jar files inside $IA_CLASSPATH$ folder or manually edit the .lax file in $IA_HOME$ with entries of your .jar files.

-Yogendra



On Wed, Sep 3, 2008 at 6:41 PM, Jen Duncan wrote:

Yogendra,

Thank you so much for your reply. I thought I needed the .lax file created after the custom code ran, and tried adding the custom code just above the launch anywhere step, but I'm guessing that did not take care of my issue. I now have moved my custom code to the pre-installation portion of IA, in the step above where the user selects the installation folder. I also write out $IA_CLASSPATH$ to the console after my installation is completed, and now my classpath is empty. In your email you stated "If you wan to run you java application using a launch anywhere it can be achieved through Advanced designer. In the properties of the file inside $USER_INSTALL_DIR$ check "Add to class path". Once the property is set the behaviour of IA changes while creatign the .lax file." What file are you speaking of that I need to check "Add to class path" in the $USER_INSTALL_DIR$? I can't find any option for the launch anywhere .lax file in my advanced designer.

Our main problem is that with our software we are always building installations and our .jar files change so often. Every time we come in to IA, we are bombarded with error messages that "this .jar file is missing". The goal of my custom code is to be able to programmatically look at a certain folder and automatically add every file in that folder to the classpath without having to select the files in IA.

I hope you can help me! It seems like this should be a very simple thing to do! There's not much help out there on the web as far as IA goes, so I feel fortunate to come across your blog!

Thanks!
Jen