Show icon in System tray causes error on reboot

Got a problem you cannot solve? Try here.
Post Reply
[email protected]
Posts: 10
Joined: Thu Aug 19, 2010 4:47 pm

Show icon in System tray causes error on reboot

Post by [email protected] »

When a system requires the installation of a pre-requisite (e.g. .Net Framework), which in turn requires a reboot the 'Show icon in System Tray, minimize setup to system tray' throws an error of 'Cannot create shell notification icon', and then quits the install.

Additional information:
IA Version; 9 r2
Win OS: Windows XP Pro SP3
Show Icon command is executed in an included script, if that matters.

any help is appreciated,

Steve
mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Show icon in System tray causes error on reboot

Post by mills »

I was able to work around this with the following approach:
//This was placed at the start of the script:

Does File Exist $DATADIR$\hasReboot.txt (get result into variable hasReboot)
MessageBox: hasReboot, hasReboot = $hasReboot$
if Variable hasReboot not Equals TRUE
Show icon in system tray, minimize setup to system tray
end

...

//This was added before any reboot commands:

Write into Text File $DATADIR$\hasReboot.txt from Value yes (at end of file)
Reboot Computer and Resume Setup

...

//You can add a delete files command immediately before Apply Install:

Delete Files $DATADIR$\hasReboot.txt (when installing)
Apply Install (get result into variable SUCCESS)
If you're using a compressed build, $SFXPATH$ would be a reasonable path to use, but DATADIR seemed least obvious to the user that it was being used.

You can also use DeleteFileA in kernel32.dll using Call DLL Function to delete the file. It'd be a good idea to place that before Terminate Installs, in case a user cancels the setup after prereqs are installed.
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
Post Reply