#1682 Installer Should Ignore Shortcut Creation Errors

Branch_+_Trunk
closed-fixed
Tim Gerundt
Installer (56)
5
2008-03-13
2008-03-08
Will
No

Hi,

The installer should ignore any errors it runs into when creating startmenu shortcuts.

The oddest thing about this error is that it happens even if you choose not to install startmenu shortcuts. Why is it accessing they key when I choose not to install any startmenu items in the first place?

I have set the startmenu key as only readable since I dont want applicatons adding startmenu shortcuts without my permission.

The installer continues fine when this happens but as you can see in the attached screenshot I first have to click the Ignore button.

Can you please make the install automatically ignore this not critical error. I mean really it's not required! More annoying than anything else. Or better yet not make it an error at all! When the installer runs into this it's pretty darn obvious the system admin disabled they key so just ignore it, please. This is the only application installer I have ever ran into this error. So its not like its needed, at all.

Thanks,

Will

Discussion

  • Will
    Will
    2008-03-08

    Installer Error Due To Registry Permissions

     
  • Kimmo Varis
    Kimmo Varis
    2008-03-10

    Logged In: YES
    user_id=631874
    Originator: NO

    This probably is InnoSetup bug then...

     
  • Kimmo Varis
    Kimmo Varis
    2008-03-10

    Logged In: YES
    user_id=631874
    Originator: NO

    Ugh, no. This is WinMerge installer bug. There seems to be some custom scripting for adding desktop icons and start menu items. Someone more familiar with InnoSetup scripting and installers need to look at that.

     
  • Tim Gerundt
    Tim Gerundt
    2008-03-12

    Logged In: YES
    user_id=652377
    Originator: NO

    I think we should remove this "MenuOrder" trick! Windows by default not order the start menu items alphabetically. You must manually specify the alphabetical sorting. Windows saves the order under "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu\Programs\XYZ" in the binary value "Order". The trick is to manually sort the menu items, copy the "Order" value and set it with the installer.

    See: http://forums.winamp.com/showthread.php?threadid=231400

    Ok, this seems to work, but:
    1. We update the "Order" value a long time not. It is still up-to-date?
    2. The other languages use translated menu items. Is the menu order the same like in the installer? (Somebody surely use the "Order" value from a English version)

    Index: WinMerge.iss

    --- WinMerge.iss (revision 5138)
    +++ WinMerge.iss (working copy)
    @@ -510,7 +510,6 @@
    Root: HKCU; SubKey: Software\Thingamahoochie\WinMerge\Locale; ValueType: dword; ValueName: LanguageId; ValueData: $00000c0a; Flags: deletevalue; Languages: Spanish
    Root: HKCU; SubKey: Software\Thingamahoochie\WinMerge\Locale; ValueType: dword; ValueName: LanguageId; ValueData: $0000041D; Flags: deletevalue; Languages: Swedish
    Root: HKCU; SubKey: Software\Thingamahoochie\WinMerge\Locale; ValueType: dword; ValueName: LanguageId; ValueData: $0000041f; Flags: deletevalue; Languages: Turkish
    -Root: HKCU; SubKey: Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu\Programs\{code:RelativeGroupPath}; ValueType: binary; ValueName: Order; ValueData: 08 00 00 00 02 00 00 00 a2 01 00 00 01 00 00 00 05 00 00 00 4c 00 00 00 01 00 00 00 3d 00 00 00 41 75 67 4d 01 00 00 00 01 00 00 00 00 00 00 00 27 00 32 00 2b 05 00 00 95 30 17 80 20 00 52 65 61 64 20 4d 65 2e 6c 6e 6b 00 52 45 41 44 4d 45 7e 31 2e 4c 4e 4b 00 00 00 00 00 00 05 00 00 00 56 00 00 00 04 00 00 00 48 00 00 00 41 75 67 4d 01 00 00 00 01 00 00 00 00 00 00 00 32 00 32 00 be 01 00 00 95 30 17 80 20 00 55 6e 69 6e 73 74 61 6c 6c 20 57 69 6e 4d 65 72 67 65 2e 6c 6e 6b 00 55 4e 49 4e 53 54 7e 31 2e 4c 4e 4b 00 00 00 00 00 05 00 00 00 50 00 00 00 02 00 00 00 42 00 00 00 41 75 67 4d 01 00 00 00 01 00 00 00 00 00 00 00 2c 00 32 00 c9 05 00 00 95 30 17 80 20 00 55 73 65 72 27 73 20 47 75 69 64 65 2e 6c 6e 6b 00 55 53 45 52 27 53 7e 31 2e 4c 4e 4b 00 00 00 00 00 05 00 00 00 58 00 00 00 03 00 00 00 49 00 00 00 41 75 67 4d 01 00 00 00 01 00 00 00 00 00 00 00 33 00 32 00 2e 00 00 00 95 30 17 80 20 00 57 69 6e 4d 65 72 67 65 20 6f 6e 20 74 68 65 20 57 65 62 2e 75 72 6c 00 57 49 4e 4d 45 52 7e 31 2e 55 52 4c 00 00 00 00 00 00 05 00 00 00 4c 00 00 00 00 00 00 00 3e 00 00 00 41 75 67 4d 01 00 00 00 01 00 00 00 00 00 00 00 28 00 32 00 ce 01 00 00 95 30 17 80 20 00 57 69 6e 4d 65 72 67 65 2e 6c 6e 6b 00 57 49 4e 4d 45 52 47 45 2e 4c 4e 4b 00 00 00 00 00 05 00 00 00

    [Run]
    @@ -835,15 +834,6 @@
    Result := RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\TortoiseSVN') or RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Classes\Directory\Background\shellex\ContextMenuHandlers\TortoiseSVN');
    End;

    -Function RelativeGroupPath(Unused: string): String;
    -Var
    - strGroup: String;
    -Begin
    - strGroup := ExpandConstant('{group}');
    - StringChange(strGroup, ExpandConstant('{commonprograms}\'), '');
    - Result := strGroup
    -End;
    -
    Function OldGroup(): string;
    Begin
    {Stores where in \All Users\Programs\ our start menu used to be located}

     
  • Kimmo Varis
    Kimmo Varis
    2008-03-12

    Logged In: YES
    user_id=631874
    Originator: NO

    Yes, lets get rid of that additional trick. I've never understood why we even need such tricks, but at the time the changes happened just because somebody thought they were cool.

    I also noticed there is a code that first removes existing start menu items. That is also invalid action if there is no previous items. And might be reason for this crash.

     
  • Tim Gerundt
    Tim Gerundt
    2008-03-12

    Logged In: YES
    user_id=652377
    Originator: NO

    > And might be reason for this crash.

    No, the problem is the trick I posted!

    Will's Vista have no access to the "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start
    Menu\Programs\WinMerge" regkey. Maybe his user account has not enough rights or the key are not exist on a Vista computer. The trick is called in the [Registry] sections and get started on every setup.

    Unfortunately we have no option to disable the startmenu items, but I think the setup will not create error messages, if he can't create the items.

    Btw: We can also remove the file "Start Menu Order.reg" in the InnoSetup folder.

     
  • Kimmo Varis
    Kimmo Varis
    2008-03-12

    Logged In: YES
    user_id=631874
    Originator: NO

    Tim, please read the description again:
    > I have set the startmenu key as only readable
    > since I dont want applicatons adding startmenu
    > shortcuts without my permission.

    Not a common thing to do, but should not cause errors either.

    I took quick look at our installer script, and we have that [icons] section there, which adds icons. Could we just add new task for start menu and make adding start menu icons related to that? And remove all those extra start menu hacks?

    We also have already a string in InnoSetup's translations for disabling start menu items creation:
    NoProgramGroupCheck2=&Don't create a Start Menu folder

     
  • Tim Gerundt
    Tim Gerundt
    2008-03-12

    Logged In: YES
    user_id=652377
    Originator: NO

    > Could we just add new task for start menu and make adding start menu icons related to that?

    If I understand the InnoSetup help correctly, he will not install the [Icons] items (without tasks), if you disable "Don't create a Start Menu folder" at the setup:

    "An entry without a Tasks parameter is always processed, unless other parameters say it shouldn't be.

    Note that the Don't create a Start Menu folder checkbox on the Select Start Menu Folder wizard page doesn't affect [Icons] entries that have Tasks parameters since they have their own checkboxes."

    The checkbox is at the 5 step from the setup. I normally not use the installer, so I did'nt notice the checkbox before! ;)

     
  • Tim Gerundt
    Tim Gerundt
    2008-03-12

    Logged In: YES
    user_id=652377
    Originator: NO

    I must still test it, but I think we could remove the [INI] section and create the startmenu website link with a easier way:

    //Old way...
    [INI]
    Filename: {group}\{cm:ProgramOnTheWeb,WinMerge}.url; Section: InternetShortcut; Key: URL; String: http://WinMerge.org/; Check: GroupCreated

    //New way...
    [Icons]
    Name: {group}\{cm:ProgramOnTheWeb,WinMerge}.url; "http://winmerge.org/"

     
  • Tim Gerundt
    Tim Gerundt
    2008-03-13

    Logged In: YES
    user_id=652377
    Originator: NO

    I remove the "start menu order" trick, which cause this bug, from Trunk SVN (In Revision 5143). I will look for more improvements.

     
  • Kimmo Varis
    Kimmo Varis
    2008-03-13

    Logged In: YES
    user_id=631874
    Originator: NO

    Good!

    I'll assign this to you for now.

    I think the bug fix would be proper for 2.8 branch now. Other improvements might be trunk-only then.

     
  • Kimmo Varis
    Kimmo Varis
    2008-03-13

    • assigned_to: nobody --> gerundt
     
  • Tim Gerundt
    Tim Gerundt
    2008-03-13

    Logged In: YES
    user_id=652377
    Originator: NO

    Committed to 2.8 SVN branch (In Revision 5145). I will post other improvements as patches.

    Thank you for the report Will!

     
  • Tim Gerundt
    Tim Gerundt
    2008-03-13

    • status: open --> closed-fixed
     
  • Will
    Will
    2008-03-15

    Logged In: YES
    user_id=520781
    Originator: YES

    Wow, thank you both. Sorry, been busy, on spring break. :)

    Glad to see it fixed, excellent, thanks again!!