Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-05-2006, 10:19 AM
Member
 
Join Date: Sep 2003
Posts: 95
Default Desktop icon "broken" after reboot.

Hi,

I have an application that has an icon embedded in it. After installation, it uses this icon to create a shortcut on the desktop to open up a URL.

When first run, everything is fine. However, when the PC reboots the image is broken. The link still works, but it doesn't display the .ico I used previously...

I've only noticed this issue on Windows XP SP2 using SWFKit 2.

Any ideas?

Cheers,

G.
Reply With Quote
  #2 (permalink)  
Old 11-07-2006, 03:12 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:Desktop icon "broken" after reboot.

Could you please upload the icon?
Reply With Quote
  #3 (permalink)  
Old 11-07-2006, 05:01 AM
Member
 
Join Date: Sep 2003
Posts: 95
Default Re:Desktop icon "broken" after reboot.

Hi,

Where is a good place to upload a .ico file?

Cheers,

G.
Reply With Quote
  #4 (permalink)  
Old 11-07-2006, 10:57 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:Desktop icon "broken" after reboot.

Please send to support@swfkit.com, thank you.
Reply With Quote
  #5 (permalink)  
Old 11-07-2006, 11:16 PM
Member
 
Join Date: Sep 2003
Posts: 95
Default Re:Desktop icon "broken" after reboot.

Email sent.
Reply With Quote
  #6 (permalink)  
Old 11-09-2006, 03:01 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:Desktop icon "broken" after reboot.

Received and under testing.
Reply With Quote
  #7 (permalink)  
Old 11-12-2006, 10:56 PM
Member
 
Join Date: Sep 2003
Posts: 95
Default Re:Desktop icon "broken" after reboot.

Hi,

Have you had any luck replicating / finding a solution for this issue?

I'm trying to release the application and this bug is holding it up.

Cheers,

G.
Reply With Quote
  #8 (permalink)  
Old 11-14-2006, 09:56 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:Desktop icon "broken" after reboot.

Sorry, we cannot replicate the problem. And after checking the created .exe file, we find that the icon is embedded in the .exe file correctly.
Reply With Quote
  #9 (permalink)  
Old 11-15-2006, 03:32 AM
Member
 
Join Date: Sep 2003
Posts: 95
Default Re:Desktop icon "broken" after reboot.

Hi,

I've used SWFKit to create a shortcut on the desktop using similar code to the following.

findBrowser() is it's own script that will determine the location of the IEXPLORE .exe

Code:
// find the location of Internet Explorer if it is not where expected
var InternetExplorer = findBrowser();
trace("InternetExplorer = " + InternetExplorer);

// find the location of the desktop folder
var desktop = Shell.getSpecialFolder("desktop");
trace("Desktop = " + desktop);

var shortcut = new Shortcut(desktop + "\\Test Link.lnk");
shortcut.targetPath = InternetExplorer;
shortcut.arguments = "http://www.whatever.com/";
var pathIEIcon = getAdditionalFile("desktop_icon2.ico");
trace("pathIE = " + pathIEIcon);
shortcut.iconLocation = pathIEIcon;
shortcut.description = "Test Link";
shortcut.save();
Can you please try doing that and see if after rebooting on a WinXP SP2 machine you get the same "broken icon" problem?

Cheers,

G.
Reply With Quote
  #10 (permalink)  
Old 11-15-2006, 05:45 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:Desktop icon "broken" after reboot.

It seems that the icon is embedded in the .exe file, that is, not a disk file. The icon will be extracted to disk only if you run the .exe file. And when the .exe file is about to close, the icon file will be removed. Moreover, every time the icon will be extracted to a different directory. Therefore, the shortcut cannot find the icon when you close the .exe file. When it cannot find the icon, it displays a "broken" icon.

To resolve this problem, you would have to copy the icon to a stable folder, e.g. the application folder:
Code:
var myIcon = getAdditionalFile("desktop_icon2.ico");
var fIcon = new File(myIcon);
var pathIEIcon = getAppDir() + "desktop_icon2.ico";
fIcon.copy(pathIEIcon);
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:56 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.