+ Reply to Thread
Results 1 to 8 of 8

Thread: Change Icon glitch

  1. #1
    Join Date
    Nov 2011
    Location
    Las Vegas, USA
    Posts
    9

    Exclamation Change Icon glitch

    My install program puts a link to my program in the Start menu as well as creates a desktop short cut. The program runs fine from either place.

    But in the properties of the link and shortcut, on a Windows 7 64-bit computer, the link to the icon for the program's link and shortcut is incorrect.

    I get an error message:

    Windows can't find the file %ProgramFiles%\<my company name>\<my program name>\<my program>.exe.

    The error is obvious. It should be:

    %ProgramFiles(x86)%\<my company name>\<my program name>\<my program>.exe.

    SetupBuilder only has %PROGRAMFILESDIR% for [INSTALLDIR]. There's no place to change the variable.

  2. #2
    Join Date
    Mar 2004
    Posts
    4,308

    Default Re: Change Icon glitch

    Bob,

    %PROGRAMFILESDIR% points to the 32-bit folder when running in 32-bit mode and to the 64-bit folder when running in 64-bit mode in a x64-bit environment.

    BTW, %ProgramFiles% (mentioned in your post) is not a SetupBuilder variable!!!!

    Does this help?

    Friedrich

  3. #3
    Join Date
    Nov 2011
    Location
    Las Vegas, USA
    Posts
    9

    Unhappy Re: Change Icon glitch

    Hi Friedrich,

    Yes, %ProgramFiles% is a Windows variable.

    What I'm pointing out is: SB correctly uses %ProgramFiles(x86)% for the target, but incorrectly uses %ProgramFiles% for the icon of the program.

    It should also use %ProgramFiles(x86)% for the icon on a 64-bit computer.

    Bob

  4. #4
    Join Date
    Mar 2004
    Posts
    4,308

    Default Re: Change Icon glitch

    Bob,

    I see what you mean. I clicked the "Change Icon..." button on a x64 machine and it displays this %ProgramFiles% item. I don't know where this is coming from because SetupBuilder itself does not set this value. I'll see what we can do here.

    Friedrich

  5. #5
    Join Date
    Mar 2004
    Posts
    4,308

    Default Re: Change Icon glitch

    Hi Bob,

    Yes, I see what you mean. I think Windows set this value automatically (because SetupBuilder does not use %ProgramFiles% at all). And the same happens when you click the "SB7 Developer" desktop shortcut on a x64 machine; it happens in all versions back to the year 2005 (which introduced support for x64).

    Thank you for bringing this to our attention. We have to find out how to overwrite the default %ProgramFiles% item.

    Friedrich

  6. #6
    Join Date
    Mar 2004
    Posts
    4,308

    Default Re: Change Icon glitch

    Interesting. This seems to be caused by a Windows bug:

    http://stackoverflow.com/questions/2...-files-which-i

    We'll try to develop a workaround.

    Thanks again for bringing this to our attention.

    Friedrich

  7. #7
    Join Date
    Mar 2004
    Posts
    4,308

    Default Re: Change Icon glitch

    Update: dirty hack added to work around this Windows bug. The workaround will be available in the next maintenance build.

    CHANGE : (sync from SB8) [SB#111181] Installer: Before calling the SetIconLocation API to set the location (path and index) of the icon for a Shell link object on x64 operating systems, GetShortPathName is used to work around a Windows x64 bug.

    Friedrich

  8. #8
    Join Date
    Mar 2004
    Posts
    4,308

    Default Re: Change Icon glitch

    Workaround modified:

    CHANGE : (sync from SB8) [SB#111181] Installer: Before calling the SetIconLocation API to set the location (path and index) of the icon for a Shell link object on x64 operating systems when running in 32-bit mode, convert the a Program Files folder item to an environment variable to work around a Windows x64 bug.

    Friedrich

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •