From what i've read it looks like that is no parameter that allows you to change the uninstall icon:
[Setup]: UninstallIconFile
Description:
Obsolete in 5.0.0. As Setup and Uninstall have been merged into a single executable, setting a custom icon for Uninstall is no longer possible.
So, is there another way to change this icon?
I'm asking because if, for example you have only your launch exe, an readme and the uninstall, users may accidentally click on the uninstall instead of lauch, which is a little bit annoying.
Thanks.
To change the uninstall executable icon, you have to change the installer executable icon, as it is the same exe, using the SetupIconFile setup section directive.
For example:
SetupIconFile=MyProgSetup.ico
You can also change the Icon that is displayed on the control panel, setting the UninstallDisplayIcon setup section directive
For example:
UninstallDisplayIcon={app}\MyProg.exe,4
;or
UninstallDisplayIcon={app}\Uninstaller.ico
Your Uninstall Icon would only be the same as your application icon if you set the IconFilename setting to the same icon as the application or have the SetupIconFile setting set to the same as your application.
By default, the Uninstall Icon is the same as the Setup icon. If you really want to make sure the user isn't confused, you can set the IconFilename parameter in the [Icons] section to your uninstall icon. Something like:
Name: "{group}\Uninstall My Program"; Filename: "{uninstallexe}"; IconFilename: "{app}\uninstall.ico"
You would need to include the uninstall.ico in your [Files] section as well.
The "setup.exe" file icon can be set by SetupIconFile
The control panel icon can be set by UninstallDiaplayIcon
In script file, I added these lines to the [Setup] section:
[Setup]
.
.
.
; Icons for setup.exe and control panel
UninstallDisplayIcon={app}\Icon.ico
SetupIconFile="Icon.ico"
Note that:
UninstallDisplayIcon is given {app} path
SetupIconFile uses absolute path, because the setup program to be created by Inno (by compiling) is yet to have {app} before my program is installed.
jachguate's answer has given me the best clue to figure out my case. This solution is tested on a few Windows 10 computers.
In Win10 This works for me when you need to have the same icon as the application icon:
UninstallDisplayIcon={app}\youApp.exe
Set the uninstaller icon as SetupIconFile, then change the resource icon in the compiled .exe. (There are many programs to do that like the ResHacker)
If you see the compiled .exe still with the uninstaller icon, just move that .exe to another folder and you will notice.
Related
I have a file compiled with NSIS.
Since MUI_ICON is used, after executing the installer file, the desired icon is displayed in the progress stage,
If you use MUI_UNICON, the desired icon is displayed in Add/Remove Programs.
However, an executable file and Uninstall.exe were created using the Installer, but
This Uninstall.exe shows the default icon for NSIS, not the one I intended.
Default icon: modern-uninstall-colorful.ico
How can I change this default icon at build time?
MUI_UNICON is correct and will change the uninstaller .exe icon.
If you see the wrong icon in Explorer then that is because it is caching the old icon. Rename your .exe and it should show the new icon. You can verify the icon by looking at the resources with Resource Hacker...
If a user has Star Dock Fences installed and they have moved the desktop icon into one of the fence panels, I find that whilst the short-cut will get removed during the upgrade it is then just re-inserted back on the desktop and I have to drag it back into the fence panel.
Is there some way we can keep it in the same fence panel or is this over complicated to detect on the target PC?
So, in my script I have:
Name: "{autodesktop}\Meeting Schedule Assistant"; \
Filename: {app}\MeetSchedAssist.exe; Tasks: desktopicon;
Here it is in a fence:
According to the icon properties it is desk a desktop short-cut, even though it is inside a Stardock Fence:
So it is a shame that the new one does not stay in the same place. I don't want to use the uninsneveruninstall flag if I can help it.
I have been provided with an answer here. No changes are required to the Inno Setup script.
Rather, the user can make a specific change to the Star Dock Fences. It has to do with Name-based rules:
By using criteria you can isolate a short-cut and tell it which fence panel it should belong too.
To quote the aforementioned link:
You can setup a fence which has a name rules set to it. Usually any program will still use its original name whenever it upgrades. So if you set the name rules it will always be moved to that specified fence when it upgrades.
Inno Setup just place a shortcut on desktop because this is specified in the configuration file. If you want to place on different locations, add them to the configuration.
You can read this guide to learn more about icons/shortcuts.
About avoiding shortcut being moved to desktop, you probably can't because Inno identifies that there's no shortcut on desktop. Anyways, you can avoid Inno Setup from changing any shortcut.
You can use the flag: uninsneveruninstall.
This answer might help you: Renaming/replacing ShortCut During Inno Setup Installation
If you don't want to use uninsneveruninstall flag, i suggest you try to add version to shortcut's name.
E.g. Name: "{autodesktop}\Meeting Schedule Assistant 1.0"; \
This guy explains.
Is it possible to change inner background color for modal and browse directory windows in Inno Setup? In my case I want it should be white.
UPD: Same behaviour is on the inner pages of Inner Setup, but I've fixed it by setting WizardForm.InnerPage.Color := clWhite;
I'm using VclStylesInno for styling my installer with custom style spreadsheat.
You cannot change the color of these in Inno Setup itself, except by a custom build of Inno Setup or some addon DLL (see below).
All you can do is to re-implement these dialogs from the scratch:
For the "browse" dialog: Handle the WizardForm.DirBrowseButton.OnClick and use CreateCustomForm and TFolderTreeView to implement the browse dialog. Download Inno Setup code and copy the existing implementation from SelFolderForm.pas.
For an example of handling WizardForm.DirBrowseButton.OnClick, see
How to display localized Program Files name (display name) during installation?
For the "cancel" dialog: Implement the CancelButtonClick event function. Make sure you set Confirm to False to get rid of the default prompt. And implement your own. Again, use the CreateCustomForm.
It's a lot of work for a small gain. I'd not do it.
Instead, you can use VCL Styles for Inno Setup (DLL) to style Inno Setup windows (including all modal dialogs).
As turned out, the reason was in the "Colors" option in Bitmap Designer, which I use to modify my installer style. This option makes some additional styling for controls:
Running Inno Setup 5.5.6. I corrected an error in my DefaultDirName value, but no matter what I do, the program continues to try to install in the old, erroneous location. Even when I set it to a value matching one of the examples:
DefaultDirName={pf}\My Program
the program continues to choose the old, incorrect path.
How do I get Inno to use the corrected DefaultDirName?
Even though the previous install went to the wrong destination directory, the install did complete. According to the documentation for DefaultDirName:
If UsePreviousAppDir is yes (the default) and Setup finds a previous
version of the same application is already installed, it will
substitute the default directory name with the directory selected
previously.
So my previous installation was overriding the new DefaultDirName. Once I uninstalled the program and re-ran the installer, it began using my corrected DefaultDirName.
Set the AppendDefaultDirName directive to no, e.g.:
[Setup]
...
AppendDefaultDirName=no
As the reference says (emphasized by me):
By default, when a folder in the dialog displayed by the Browse...
button on the Select Destination Location wizard page is clicked,
Setup automatically appends the last component of DefaultDirName onto
the new path.
For example, if DefaultDirName is {pf}\My Program and "Z:\" is clicked, the new path will become "Z:\My Program".
Setting this directive to no disables the aforementioned behavior. In
addition, it causes a Make New Folder button to appear on the dialog.
Is it possible to use same Inno Setup installer for installing new or updating/upgrading application. For example If the application is already installed the installer will check current version against newly availible. If it is true then I would like the installation procedure to be silent, meaning showing only the progress of update and not all availible installation features (e.g. folder location e.t.c). Thanks.
=======
The solution to the problem was :
Passing the parameters /SILENT/SUPPRESSMSGBOXES
taken from
http://www.jrsoftware.org/ishelp/index.php?topic=setupcmdline
For the standard screens, simply add the following to your [Setup] section:
[Setup]
DisableDirPage=auto
DisableProgramGroupPage=auto
This will automatically hide the directory and group selection pages on subsequent installs (using the previously selected values, by default, unless you've used other settings that disable that behaviour).
Components and Tasks will still display, but that's usually a good thing as it allows the user to add additional components or re-perform certain tasks. (Note that you can use the checkedonce flag on [Tasks] entries to only tick them by default during the initial install, but allow the user to re-tick them manually if required.)
It's possible to skip even more pages through use of [Code], but this is rarely necessary.
Another option is that if the installer is being run from your application itself (eg. as part of a "Check for new versions" task) you can use the /SILENT command line parameter to hide the normal interactive UI.