by Michael S. Kaplan, published on 2006/10/05 00:11 -07:00, original URI: http://blogs.msdn.com/michkap/archive/2006/10/05/792859.aspx
The question Abdul asked me (via the Contact link) was:
Sir, I installed msklc after severe frustration as you know it requires v1.1 of .net, even if v2.0 is installed. I knew this after much time.
Now I created the first ever keyboard for Siraiki language (spoken by 14m people in pakistan, which is part of Unicode v5.0). But when i build the dll and setup package, it builds the dll but not the windows installer package, saying "keyboard layout creator was unable to create the windows installer package".
I searched the net for help regarding this error message, but in vain. I hope you are the only person who can help.
Thanks in anticipation of reply!
First let me apologize about that 1.1/2.0 thing, I can promise you that it is high on the list of things I am nagging people about these days (my very next opportunity to do so is mere hours away!).
Now there are very few things that can cause the attempt to build the setup package to fail (all it is doing is running a series of queries to insert the needed rows into the .MSI file). In fact, assuming you are not trying to build the file into a read-only location and without seeing the MSKLC file (and trying to channel some of Raymond's powers of psychic debugging!), the only thing I can think of would be a string be added from this dialog:
that contains a ' (U+0027, a.k.a. APOSTROPHE) and thus when the attempt was made to insert the row into the Windows Installer database file (the .MSI file), the insert that unfortunately did not properly escape the character failed and returned this error:
A better error message would be nice here, of course.
Better validation that warned of the actual problem would be even nicer.
And proper escaping of these characters to let the insert succeed and the layout build would be the nicest thing that could happen....
Anyway, assuming this is the problem, sorry about this one too. If this isn't it, I need to know a bit more about this keyboard, and possibly get a copy of the .KLC file (let me know if your trouble is not being caused by the above)....
(Credit also to Erich Barnstedt in Ireland, who separately reported the same problem in the not too distant past and reactivated the bug report that had been closed after this bug had been fixed a long time ago but apparently regressed! However, Abdul's scenario of a Seraiki (a.k.a. Siraiki) keyboard is a much more interesting one to me!)
This post brought to you by ' (U+0027, a.k.a. APOSTROPHE)
# Heath Stewart on Thursday, October 05, 2006 11:40 AM:
You'll have a problem if you're using MsiDatabaseOpenView to pass in the SQL-like expressions: you can't escape single quotes. Instead, you have to select or (or a single, depending on what you do next) records from the table using MsiDatabaseOpenView, then construct a record using MsiCreateRecord with the right number of fields - including your text with the single quote - then use MsiViewModify to "set" the record in your view.
# Michael S. Kaplan on Thursday, October 05, 2006 1:13 PM:
Believe it or not, the MsiCreateRecord route is mostly what we use now, for unrelated reasons. I think these ones were just missed?
And, since we fixed the problem at one point, some other change re-introduced it and the regression was not caught.
Something to fix for next time, I suppose. :-)
# Björn on Thursday, October 05, 2006 4:56 PM:
(Hijacking an sort of unrelated entry)
While reading this entry the particles of inspiration hit me: why not try to "fix" the keyboard mapping of my notebook to a) get rid of the caps lock key a b) get an easier to reach "Context menu" key (the original one is located atop of the F9 key), just to find out that neither seems possible.
So, these questions arose:
1) Is it possible to deactivate the caps lock key through MSKLC or if not, is there another (easy) way to get rid of it?
2) Can one utilize non standard keys (my laptop [like many other] has an extra Fn key) in MSKLC? Or do I need to hack a custom keyboard driver to get Fn+Left Alt send the WM_CONTEXTMENU message?
# Björn on Thursday, October 05, 2006 5:00 PM:
I should have read [1] before posting the above comment. It pretty much looks like I need to do my own keyboard thingy :)
[1] http://blogs.msdn.com/michkap/archive/2005/08/05/448225.aspx
# Dean Harding on Thursday, October 05, 2006 8:42 PM:
Björn: I'm not a fan of caps lock either. I never use it, and I always seem to inadvertently hit it...
# Björn on Friday, October 06, 2006 9:57 AM:
Dean, yeah, that is the reason why I want to get rid of it - and I am soooo happy that my MS keyboards software on the desktop allows me to disable it :)
# ReallyEvilCanine on Friday, October 06, 2006 2:25 PM:
# Michael S. Kaplan on Friday, October 06, 2006 3:25 PM:
Hopefully people will understand why MSKLC (a tool developed by folks on a Windows International team) would not specifially target this scenario.
:-)
# ReallyEvilCanine on Friday, October 06, 2006 5:12 PM:
# Michael S. Kaplan on Friday, October 06, 2006 5:20 PM:
If you read the text right above the comment line in browser, it lays out what works and what does not.
Of course no one ever reads it before they leave a comment. :-)
As for the CAPS LOCK key, asked and answered. But if you want more:
Not everyone hates and some keyboard use SGCAPS and need it. It is not an internationalization issue and so it is not a part of MSKLC's mandate to do something with.
# ReallyEvilCanine on Friday, October 06, 2006 5:36 PM:
# Michael S. Kaplan on Friday, October 06, 2006 5:41 PM:
Have you run MSKLC before? :-)
Those aspects of CAPSLOCK are related to language support and are specifically configurable. One can design a layout that causes the CAPSLOCK to have no effect.
But MSKLC is for per layout changes, and not for a "destroy the key on all layouts" functionality. Even if there were a language argument for it -- which there is not.
More to belabor? Or can we get back to the actual topic? :-)
# Random note in passing on Friday, October 06, 2006 8:49 PM:
# Michael S. Kaplan on Friday, October 06, 2006 9:03 PM:
Amazing how many people need to keep this offtopic thread going.
People, move it over to the other post, or I start deleting. LAST WARNING!!! :-)
# Daan Nusman on Sunday, November 12, 2006 7:18 AM:
Thanks for the tip! That indeed fixed the error message I got :)
referenced by