CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    Join Date
    Aug 2009
    Posts
    98

    [RESOLVED] Add icon with Inno Setup

    Hello everybody,

    With Inno Setup, I can create an icon for the Uninstaller because in the wizard, he ask for it.

    But not for the program himself once it's on your desktop.

    How can I add it?

    Code:
    [Tasks]
    Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
    Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
    
    
    [Icons]
    Name: "{group}\xxxxxxx v1.02"; Filename: "{app}\Manual order v1.02.exe"
    Name: "{group}\{cm:UninstallProgram,xxxxxxx  v1.02}"; Filename: "{uninstallexe}"
    Name: "{commondesktop}\xxxxxxx  v1.02"; Filename: "{app}\Manual order v1.02.exe"; Tasks: desktopicon
    Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\xxxxxxx  v1.02"; Filename: "{app}\Manual order v1.02.exe"; Tasks: quicklaunchicon
    Thanks for your help again.

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Add icon with Inno Setup

    I have it in a PJT file:
    Code:
    DesktopIcon=1
    AllowNoIcons=0
    and then this part:

    Code:
    [Icons]
    Name: {group}\Block; Filename: {app}\Block20.exe; WorkingDir: {app}
    Name: {group}\Block on the Web; Filename: {app}\Block20.url
    Name: {group}\Uninstall Block; Filename: {uninstallexe}
    Name: {userdesktop}\Block; Filename: {app}\Block20.exe; Tasks: desktopicon; WorkingDir: {app}
    Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\Block; Filename: {app}\Block20.exe; Tasks: quicklaunchicon; WorkingDir: {app};

    (Used Inno Setup from www.randem.com, but that was a few years ago.)
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Aug 2009
    Posts
    98

    Re: Add icon with Inno Setup

    I don’t understand perfectly.

    Where do I assign the icon for the .exe in Inno Setup?

    My icon that I want to use is in : C:\Documents and Settings\xxxxx\My Documents\VB6 folder\PNG v2.ico


    Code:
    DesktopIcon=1
    AllowNoIcons=0
    and then this part:

    Code:
    [Icons]
    Name: {group}\Block; Filename: {app}\Block20.exe; WorkingDir: {app}
    Name: {group}\Block on the Web; Filename: {app}\Block20.url
    Name: {group}\Uninstall Block; Filename: {uninstallexe}
    Name: {userdesktop}\Block; Filename: {app}\Block20.exe; Tasks: desktopicon; WorkingDir: {app}
    Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\Block; Filename: {app}\Block20.exe; Tasks: quicklaunchicon; WorkingDir: {app};

  4. #4
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Add icon with Inno Setup

    You load the icon into the EXE before you compile it. I don't think you can assign an icon
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  5. #5
    Join Date
    Aug 2009
    Posts
    98

    Re: Add icon with Inno Setup

    What is the easiest way to load it before i compile it?

  6. #6
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Add icon with Inno Setup

    Add the icon as your main form icon, and that will make it the default for the exe
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  7. #7
    Join Date
    Aug 2009
    Posts
    98

    Re: Add icon with Inno Setup

    I think my explanation was not perfect.

    What I want is to add in the VB6 project an icon for the program once it is install.

    Not the installer and / or the uninstaller.

    Is that possible?

  8. #8
    Join Date
    Apr 2009
    Posts
    394

    Re: Add icon with Inno Setup

    Open project files in vb.
    Click on main form for application.
    In the properties box of the form, look for Icon.
    Click ... button and browse to icon you want.
    OK.
    Then go to VB's IDE Menu>Project>Properties.
    On Make tab, in frame with title of Application, select the form name that has this icon you want to use.
    OK.

    Now recompile project and you are done.




    Good Luck

  9. #9
    Join Date
    Aug 2009
    Posts
    98

    Re: Add icon with Inno Setup

    Perfect .

    That's what i wanted.

    Thanks again.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured