View Full Version : Multitasking
NewsArchive
12-15-2006, 01:47 AM
Friedrich... a slightly odd thing...
I guess you're using one of the Microsoft tools to sign an installer .exe.
I've found that if I start a compile and then, say, look at these groups in
Outlook Express, and then open and read a message... I tend to hang SB5.
It took me a couple of times to realize that the "Enter Private Key
Password" window was open somewhere, waiting for a password to be entered
If I just let SB5 do its thing and am not selecting other windows on my
desktop, SB5 fills in the password and completes the compilation and signing
fine.
Version: 5.6.1666
Jane Fleming
NewsArchive
12-15-2006, 11:01 AM
Jane,
Can you reproduce this at will? It "should" wait only for a few seconds and
then the compiler "should" report an cannot code-sign yadayada message.
Friedrich
NewsArchive
12-17-2006, 05:23 AM
Actually, I tripped it up when my computer clock said 11:00 but it was 11:02
by the time I made the first screen shot. As you can see, the shot at the
bottom was at 11:06. SB5 is VERY patiently waiting <g>
Jane Fleming
NewsArchive
12-17-2006, 05:23 AM
Hi Jane,
Yes, it happened to me quite a few times, but I was unable to reproduce this
at will.
I did not see this in the latest SetupBuilder 6 (I have increased the "wait
time" a bit). So hopefully this fixed the problem.
If you see it again in SB6 (should be available on Monday), please let me
know.
Thanks,
Friedrich
NewsArchive
12-17-2006, 05:24 AM
Hi Jane,
To be on the safe side, I'll add an additional function to try to bring the
(external) code-signing tool to the foreground (so the "Enter Private Key
Password" window gets focus).
Thanks,
Friedrich
NewsArchive
12-17-2006, 05:24 AM
Hi Friedrich,
I don't see that increasing the "wait time" a bit will help... in that the
screen shot I sent you already shows 4 minutes (and it had already been
waiting 2 minutes before the first shot).
As for reproducing it at will...
1. Start a compile. Have one or more other programs open on your desktop
(IE or Outlook Express work fine).
2. Watch the compile out the corner of your eye.
3. Just when SB pops up the password window, click on a window from another
program... giving it focus.
Now, even if you "discover" the password window, it will be sitting there
waiting for you to type the password manually.
I've just done that twice. In fact, as I was typing this message, SB
interrupted my typing and inserted my private key password into the previous
sentence!
And now the window is waiting... waiting... waiting forlornly for the little
password that will never arrive.....
Jane
NewsArchive
12-17-2006, 05:24 AM
Hi Jane,
What the SB5 compiler does is to start a SendKey function in the background
and then wait for a second (the SendKey function waits, not the compiler).
The compiler immediately starts the signcode.exe. What happens in your case
is that signcode.exe does not have focus and SendKey fires the password to
the currently "active" application (not signcode.exe). The compiler has to
wait for signcode.exe termination.
The SB6 compiler starts SendKey and waits *two* seconds (to give
signcode.exe a little more time so it can better initialize itself). Then
it brings signcode.exe into the foreground and immediately passes the
password.
I hope this works around the timing issue.
Friedrich
NewsArchive
12-17-2006, 05:24 AM
Another question...
Which tool are you using for signing?
When I invoke signtool.exe from a batch file, the password window never
appears...
Jane
NewsArchive
12-17-2006, 05:24 AM
Hi Jane,
We are using signcode.exe. The problem is that SignTool.exe is not
supported on Windows NT and Windows Me/98/95.
Friedrich
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
"point. click. ship" - that's SetupBuilder 6
Create Windows Vista ready installations in minutes
NewsArchive
12-17-2006, 05:24 AM
After I wrote that, I realized that you'd probably have to create a .pfx
file on-the-fly to make the batch thing work anyway.
I suppose theoretically, SB could detect whether it's runing on one of the
older OSs and, if not, use signtool instead.
Or maybe you can find a way to guarantee that signcode's password window
will have focus when it needs to... otherwise, it's a little unsettling to
be typing something and suddenly have my certificate password pop up in the
middle of what I'm doing <g>
Jane
NewsArchive
12-17-2006, 05:25 AM
Jane,
I fear a .pfx does not work. 1 1/2 years ago Microsoft told me that SendKey
is the only solution to automatically pass the password to the tool. Or
requesting a certificate that does not use any password.
SB6 tries to bring the code-signing tool to the back ground now.
Friedrich
NewsArchive
12-17-2006, 05:25 AM
That may be the only way to send the password to signcode.
Signtool, though, can use a batch file with a pfx file. There's an example
batch file in the clarionmag article article I wrote a month or so ago.
I'm sure you'll find a solution. Or else, no big deal just to stop working
until SB finishes doing its thing.
Jane
NewsArchive
12-17-2006, 05:25 AM
I've had it happen to me once or twice as well, but I haven't tried to
reproduce the problem.
--
Dave
Clarion Magazine: http://www.clarionmag.com
In-depth Clarion articles, news, tips & tricks, printed books and e-books
Clarion blog: http://www.clarionmag.com/blog/
Personal blog: http://www.knobblegrud.com/
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.