1

I found out that when you click on icon of installer in top left corner, dropdown menu appears, showing off Minimize, Maximize, Close and About options...

When I click About, it shows info about Inno Setup version, which I really don't want to be there.

Am I able to somehow disable whole this dropdown menu without actually disabling whole System Menu or disabling border? Or minimally disable About option or change its contents to my own, so it is minimally useful in some way.

Thanks for any kind of help with this issue.

  • 1
    How to intercept the about box menu item you can find [`here`](http://stackoverflow.com/q/14828144/960757). But again, it's a license violation. – TLama Aug 04 '14 at 04:28
  • I didn't knew that :/ Anyway, thank you all for help, going to try it and see how it works... And re-read license cause as I see now I overlooked some (for me...) important informations... – SeriousDude Aug 04 '14 at 14:34
  • You're welcome! Anyway, don't forget to [`accept answers`](http://meta.stackexchange.com/a/5235/179541) whose resolve your questions. Thanks and welcome to StackOverflow! – TLama Aug 04 '14 at 14:35
  • I have one more question TLama... I know that GOG is using Inno Setup as well, and they seem to be using bsDialog as borderstyle, blocking About too that way... Also, I don't know if this can be really called breaking license agreement, because informations are there, but they are blocked, same way as GOG did and for example Graphical Installer do... Because Graphical Installer even encourages you to block it... By removing border entirelly... And by that, you also delete About info as well, so I wouldn't mind this as that big deal actually... – SeriousDude Aug 04 '14 at 14:47
  • Also, it seems like they mainly don't want users and companies to claim installer as their, even when they mess with source code itself, which I don't plan to do, so I don't know... Anyway, as I already told you both, thank you for help :) – SeriousDude Aug 04 '14 at 14:50
  • I'm not a lawyer (hopefully; it must be boring :-), but I would interpret *"must retain all occurrences of the above copyright notice and web site addresses that are currently in place"* as that even the occurrence of the menu item should remain. Still, almost no one uses system menu, so I wouldn't even bother removing it. Maybe you can directly ask Martijn Laan if that violates the meaning of the license. – TLama Aug 04 '14 at 14:55
  • Yeah, I'm considering that too :) – SeriousDude Aug 04 '14 at 15:05

1 Answers1

7

You can remove the about menu item using the WinAPI DeleteMenu function. First you must retrieve a handle to the system menu and then remove the menu entry using DeleteMenu function.

Try this code:

[Code]
const
  MF_BYCOMMAND = $00000000;
  MF_BYPOSITION = $00000400;

type
  HMENU = THandle;

function GetSystemMenu(hWnd: HWND; bRevert: BOOL): HMENU; external 'GetSystemMenu@user32.dll stdcall';
function DeleteMenu(hMenu: HMENU; uPosition, uFlags: UINT): BOOL; external 'DeleteMenu@user32.dll stdcall';
function GetMenuItemCount(hMenu: HMENU): Integer; external 'GetMenuItemCount@user32.dll stdcall';

procedure InitializeWizard;
var
  SystemMenu: HMENU;
begin
  { get the menu handle }
  SystemMenu := GetSystemMenu(WizardForm.Handle, False);
  { delete the `About Setup` menu (which has ID 9999) }
  DeleteMenu(SystemMenu, 9999, MF_BYCOMMAND);
  { delete the separator }
  DeleteMenu(SystemMenu, GetMenuItemCount(SystemMenu)-1, MF_BYPOSITION);
  { ... }
end;

Also you can use the same technique to add your own system menu entries.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
RRUZ
  • 134,889
  • 20
  • 356
  • 483
  • 2
    It's worth to mention that by removing that about box menu entry you're violating Inno Setup license. – TLama Aug 04 '14 at 03:49
  • @TLama I'm not aware about that. Can you point some documentation about this? – RRUZ Aug 04 '14 at 04:39
  • 1
    The point 2 of [`the license`](http://www.jrsoftware.org/files/is/license.txt) says: *"All redistributions in binary form must retain all occurrences of the above copyright notice and web site addresses that are currently in place (for example, in the About boxes)."* which includes the menu item as well I think. – TLama Aug 04 '14 at 04:51
  • Yes, this is working fine :) I'll check link which TLama posted in comment to question to see how that one works but this is basically answer for which I were looking for... But I'll definitely check the license... I don't want to necessarily violate anything... – SeriousDude Aug 04 '14 at 14:39