thill
Posts: 111
Joined: Sat Jan 21, 2012 5:58 pm

Shortcut icon gone after reboot

After digging through the forum I could not find a solution for this scenario:

Have a Desktop shortcut to a batch file (installed file).
The icon is built into an .exe by AI.
Installs fine and shows icon.
However, after reboot the icon is gone.

When changing the shortcut's icon after reboot the message is displayed "Windows can't find the file %SystemRoot%\Installer\{C922...}\adminclient.exe".

After reboot that {%SystemRoot%\installer\C922...}\ directory is no longer there.

This is a .EXE installer. In Media "Do not delete extracted MSI and CAB files" is enabled. However those are in a different directory anyway.

The New Shortcut To -> Installed File does not allow an APPDIR-relative icon to be specified for this type of shortcut.

This happens with both the Desktop and program-group shortcuts.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Shortcut icon gone after reboot

Hello,

Here are a couple of similar related threads you can follow regarding this:
Missing Icon Image on Shortcut
Internal shortcut icons from file

Do any of them suit your current scenario?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
thill
Posts: 111
Joined: Sat Jan 21, 2012 5:58 pm

Re: Shortcut icon gone after reboot

mihai.petcu wrote:Missing Icon Image on Shortcut
For this one, it is not an upgrade and the only MSI's are the 32- and 64-bit variants created by AI.

Internal shortcut icons from file
On this one, our software does not do anything with %SystemRoot%/installer.
My scenario is:
* An AI-created shortcut to an installed batch file
* That shortcut uses an icon file
* AI generates an .EXE containing the icon
* The .EXE is placed in a %SystemRoot%/installer directory at install time
* Two 1K .EXE files are found in %SystemRoot%/installer/{C922...}
* After a reboot the entire directory is gone
* The icon is missing from shortcuts in Desktop and Application Shortcut Folder (one of the .EXE)
* The icon is also missing for the product in Control Panel, Programs and Features (the other .EXE)

All that seems to be outside of my control. We have no other relevant .EXE's, and do nothing with the %SystemRoot%/installer directory. Only AI places anything there - and for some reason it's being deleted at reboot only. Logout/login does not cause the problem.

Is there a setting anywhere to tell Windows to not delete the directory in %SystemRoot%/installer ?

Or is it possible this is a problem due to multiple AI upgrades and project XML conversions?

:arrow: Went to test this on all our supported operating systems - 2008 R2, Win7, and XP - and now I am not able to reproduce the problem!?! This is a new build of our installer, however the previous build was done with the same version of AI at 9.2.

Is it possible the anomaly "went away" from a built-in conversion?

Or, given during testing our product is uninstalled and re-installed repeatedly, that a remove operation was scheduled - then we installed again before a reboot?
thill
Posts: 111
Joined: Sat Jan 21, 2012 5:58 pm

Re: Shortcut icon gone after reboot

This is happening with AI 9.2.

We are (still) getting complaints from our tech staff and customers about Desktop and Application Shortcut shortcuts losing their icon. The shortcut is for an installed batch file that runs an interactive tool of our application.

As mentioned in an earlier post the directory that contains the 1K .exe files generated by AI that is located in Windows/installer/ is being deleted. But there is no option to control that. It seems something somewhere is telling AI or the Windows Installer to remove that directory. Sometimes it happens on reboot, but other times a reboot is not needed for the icons to go away.

We install the .ico file, but the "Shortcut to Installed File" dialog does not provide an option to use an installed icon file. It always builds the 1K .exe that is placed in the Windows/installer/[ProductCode]/ directory.

I am curious why "Shortcut to URL" allows an installed icon to be used, but "Shortcut to Installed File" does not and always builds a .exe?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Shortcut icon gone after reboot

Hello,
I am curious why "Shortcut to URL" allows an installed icon to be used, but "Shortcut to Installed File" does not and always builds a .exe?
This is because each type has its own configuration particularities. For "Shortcut to URL", the icon file must be present on the target machine whereas "Shortcut to Installed File" can get the icon file from binary format.
Also, neither shortcuts enable the .EXE bootstrapper.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
thill
Posts: 111
Joined: Sat Jan 21, 2012 5:58 pm

Re: Shortcut icon gone after reboot

Do you have a solution or any suggestions for the problem of the icons "going away" because the Windows/installer/[ProductCode]/ directory is being deleted?

The way it works is outside of my control. It seems like a bug.
bnicolas
Posts: 4
Joined: Thu Sep 26, 2013 8:30 pm

Re: Shortcut icon gone after reboot

Hi Thill,

Did you ever solve this issue - I am having exactly the same issue on any machine I install my application on. I find it even happens when I uninstall any other program and reboot.

I guess that because this is happening on multiple machines it cannot be a corrupt Window Installer executable.

Thanks,
Barry
thill
Posts: 111
Joined: Sat Jan 21, 2012 5:58 pm

Re: Shortcut icon gone after reboot

bnicolas wrote:Did you ever solve this issue
The solution was to change the target Java applications to an .EXE by using one of the wrappers. I used WinRun4J (http://winrun4j.sourceforge.net/) however Advanced Installer may be able to do that now.

WinRun4J allows you to "inject" an icon into their .EXE that then runs the Java application. That way AI does not build a stand-alone .EXE to hold the icon(s).

There may be other approaches, but this one has worked for us for about 1.5 years.

Return to “Common Problems”