Eons ago in Internet years, I wrote what proved to be a very popular tool, Tester, the latest edition appeared in my second book. With it you could record and playback UI automation scripts. While Tester wasn’t perfect, the number of companies using it as their automation tool of choice was very gratifying. In fact, there were so many, I probably should have made a business out of updating and supporting the tool. At least it was very gratifying to know I’d produced something useful!
Since I rarely do any UI development, I don’t need Tester that much myself. Today, I had a need so grabbed the code with the thought of giving it a quick dusting off so I could use it on Vista x64. After 20 minutes of some tweaks and adjustments to move the application to 64 bits, the real work started. My debug builds were always asserting because SetWindowsHookEx was returning false when my recorder application tried to set the WH_JOURNALRECORD journal recorder to record all the mouse and keystrokes. The last error value was access denied so I simply thought that I needed to run the recorder process with elevated rights. If only it were that easy, because I still got the access denied when running with high integrity as well.
It turns out lots of people were reporting the same issue, but all the reports were from way back in the Vista beta days. After several hours of searching I’d run across several articles where there were discussion about how the journal recording hook was used by key loggers and other nefarious programs so Microsoft was making changes in Vista to close that hole. While I was all in favor of closing the hole, how in the heck was I going to get my simple recorder application to work?
According to some of the forum reading it looked like people got journal recording working by turning off UAC. That was totally unacceptable to me as I have written before I like UAC. Anyway, turning off UAC just for journal recording was the easy way out and made me feel dirty. I dug in for battle and fired up the search engines hard. As I never found this information in one spot, I thought I’d put it here in case someone else wants to use a journal recording hook.
Since this took three hours of my life to figure out I thought I’d share the solution in case someone else needed the information. While it would have been nice to have all this information in the journal recorder documentation, I’m really glad Microsoft shut down the security hole!
Cloud management is difficult to do manually, especially if you work with multiple cloud…
Azure’s scalable infrastructure is often cited as one of the primary reasons why it's the…
https://www.youtube.com/watch?v=wDzCN0d8SeA Watch our "Unlocking the Power of AI in your Software Development Life Cycle (SDLC)"…
FinOps is a strategic approach to managing cloud costs. It combines financial management best practices…
Using Kubernetes with Azure combines the power of Kubernetes container orchestration and the cloud capabilities…
In the intricate landscape of modern business, compliance is both a cornerstone of operational integrity…
View Comments
Je viens de tomber sur un post intéressant sur le blog de John Robbins . Il y indique comment faire un
Where can we get updated source code? Any chance of putting this on CodePlex so others can extend it and support it?
Where can i get the latest source code of Tester application? I tried the following URL http://msdn.microsoft.com/en-us/magazine/cc301453.aspx, but the source code might have removed from the URL.
Can you please suggest the way how to get the source code for your article "Tester Utility, Take 3: Adding Mouse Recording and Playback" available in the MSDNMAGAZINE March2002.
I had figured out everything except the weird step of copying the output to the program files hierarchy.
Good stuff; now M$ needs to allow the application to launch in the debugger with the uiAccess='true'. That is just down right stupid for not letting that work as a required item.
This article is very useful for me! Thank you very much for publishing your valuable experience!
Thanks! Very helpful.
Thanks! Very helpful.