Using a custom icon causes not a valid Win32 application.

Got a problem you cannot solve? Try here.
Post Reply
hdurdle
Posts: 3
Joined: Wed Feb 04, 2009 11:36 am

Using a custom icon causes not a valid Win32 application.

Post by hdurdle »

InstallAware 8.01, building an uncompressed install.

If I add an icon (Add-Remove Programs->Load Icon) the resulting .exe throws a "Foo.exe is not a valid Win32 application" error on launch.

Removing the icon and rebuilding makes this error go away, but leaves me with the generic icon, and we want to brand the installer.

I'm using Axialis IconWorkshop to create a standard Windows .ico file, containing 4 icons - 256x256, 48x48, 32x32 and 16x16.

I can't find guidance in the documentation for what kind of icon size or colour depth is supported by InstallAware. Is there a specific icon type I should be creating, or should my other icon have worked and this is a bug in InstallAware?

Many thanks.
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

We're not aware of any problems with custom icons in InstallAware.

I suspect something is wrong with the icon as created by your icon workshop. Try to import it to another tool and then export it from there, to see if that fixes the issue.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
hdurdle
Posts: 3
Joined: Wed Feb 04, 2009 11:36 am

Post by hdurdle »

MichaelNesmith wrote:Try to import it to another tool and then export it from there, to see if that fixes the issue.
Thanks Michael. Can you recommend a tool that you know generates valid icons - I've used three different tools now, Icon Workshop, Sib Icon Editor and an online tool that generates ico files from png. None of these icons result in a valid binary.

Should I be including only 48x48, or only 32x32, or is there some other magic combination of size and colour depth?

Are you able to attach a known good icon that I can try?

Thanks.
95se5m
Posts: 4
Joined: Thu Jan 10, 2008 10:32 am

Post by 95se5m »

I am having the same problem, I have used a couple different icons from different sources with the same end. Is there a specific set of parameters for an icon file that need to be followed? I upgraded from 7.5 to 8.01. 7.5 loved the icons, there was no issue. Same project, same icons in 8.01 and all heck breaks loose.

Any help would be appreciated as I do not want to have to rewrite the installs completely to make them work again. Removing the file through MSI editor doesn't seem to fix it after it blows up either.

Thank you in advance.
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

There's nothing changed in InstallAware between those versions that affects handling of icons.

Since you make reference to how you don't want to re-create your projects, and removing your icons did not make any difference, that's a clue as to what might be going wrong. Hint: It's probably not the icon.

Empty your temp folder, delete the files *ulterior* in your InstallAware folder, and try your build again.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
95se5m
Posts: 4
Joined: Thu Jan 10, 2008 10:32 am

Post by 95se5m »

Okay, I understand what you are saying but I tried this experiment.

I created a install, that does nothing really, just chose the .NET wizard and clicked build. It started the installer after a build. I then added an icon to that project, rebuilt it, and *poof*, exe file gives me grief about not being a valid x86 application.

I tried this same method with a couple icon files with the same result. Before adding it it's fine, after it blows up. I have tried 16x16, and 32x32 also a couple from older versions of windows in case it was a color depth issue.

Thank you for your help on this...
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Do you have some kind of anti virus on your system? Also, upload a few icons that fail for you so we can test them locally.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
hdurdle
Posts: 3
Joined: Wed Feb 04, 2009 11:36 am

Post by hdurdle »

MichaelNesmith wrote:Do you have some kind of anti virus on your system? Also, upload a few icons that fail for you so we can test them locally.
Yes, Avast 8 av is installed. Behaviour is the same even if it is disabled.

I've noticed that when adding an icon file of approx 200K to the project, the resulting .exe increases by approx 600K (and fails to launch).

I am now clearing my %TEMP% and deleting the *ulterior* files in the InstallAware folder before every build.

As an experiment, I just extracted the icon that InstallAware puts in the .exe by default. I then manually added that icon as the installer icon. The file size of the resulting .exe increased by 600K and results in the same error.

I've attached the MAINICON.ico file I extracted.

Thanks.

File Attached:

<a href="files/0205200991/MAINICON.ico">MAINICON.ico
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

This is unable to reproduce. I can build just fine here. You will need to narrow the issue down a little further, or send us a VM which reproduces this issue consistently.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Also please note that even disabling an AV might not do the trick if the AV is the culprit. Such products install file system drivers which may remain active in pass-through mode and if those drivers are at fault, then disabling the AV might have no effect. You will want to test clean to be certain.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
jweksej
Posts: 93
Joined: Wed Sep 27, 2006 4:54 am

Re:

Post by jweksej »

> I suspect something is wrong with the icon as created by your icon workshop.
I have this problem now on IA9R2. It was 3 times today. Just simple rebuild without any changes helped. Very strange :-(
Post Reply