Wow. Thanks MJTNET and Gammy. I'm trying the secpol.msc, disable running as standard user, and reboot. I'll have info tomorrow as to whether or not VT will run this way (using admin/admin and no UAC).
MJTNET - that's a seriously useful link - thanks for posting it up.
However, I did try launching setting a test app on 5308 to "run as administrator" and the hooks were still refused. Back on 5270 I even tried logging on as the built-in Administrator and running the test app - still no dice.
Of course it's very possible I did something wrong - it'll be good to see if you have more luck - please post up your findings!
This is extremely frustrating. There is no suggestion anywhere that we need to recode if we use this function but it doesn't work in Vista. I have seen no compatibility guide showing what changes we need to make. This message has now been on this forum for three months and NO ONE from Microsoft has responded. We are left in the dark.
I signed up for the buddy program a month ago, primarily because I need to find a way to actually get some proper help in this matter and I was getting no response here, but, guess what, I have had NO response from that either. So much for the buddy program. Here we are doing our utmost to use the official channels of communication and getting NOWHERE.
Can someone please provide an official answer. What has changed here and what are we supposed to do make these functions work, our software DEPENDS on them!!!
Well, I followed the instructions in that article to the letter. No luck. It actually gets worse.
I am logged in as an administrator. I modified my EXE with PE Resource Explorer and changed the manifest resource to include the security attributes as in the example. I checked that I didn't mess up by running it in XP and it ran fine. When I run it in Vista I now get "Access Denied" on the command line! I then changed the manifest resource completely by replacing the entire resource entry with the whole sample from the article. Same thing - "Access Denied".
The documented restriction that JournalRecord can't record activity involving a higher privilege process makes sense, and that alone will probably force a lot of apps to be changed, since the requirement to run with admin privs will be a turn off for many potential buyers. But, fair enough - MS wants to tighten up security.
However, the fact that you can't set a JournalRecord period even when you are apparently running the app as an Administrator doesn't seem to square up. I mean, setting something to run as Admin should be the same (for that app) as the secpol change to stop all apps running as standard user. Or am I missing something
Anyway, the documented restriction is probably enough to make me swap JournalRecord for the low level input hooks (which do work), and "fake" playback using SendInput or similar.
But at least MS has made work for itself as well as the rest of us. It'll either have to let Visual Test die (and annoy a great many test labs in the process) or recode it themselves so that it can work on Vista...
Perform a window handle validation of higher process privilege.
SendMessage
or PostMessage to higher privilege application windows. These
application programming interfaces (APIs) return success but silently
drop the window message.
Use thread hooks to attach to a higher privilege process.
Use Journal hooks to monitor a higher privilege process.
Having read this article I think I understand it that all processes run
as lower privilege processes unless otherwise instructed via the new
requestedExecutionLevel element of the manifest file.
So to solve this issue it would appear the user will have to be an
administrator and you would need to include the new manifest
instruction.
Haven't tried it yet, but will report back when I have.
If this is the only solution it is a bit of a nightmare as it means
users must be admins to run the software! I hope someone at Microsoft
does eventually take the time to read this thread (it would appear
Microsoft ignore this forum) and considers allowing journal hooks in
regular processes otherwise a whole host of existing applications are
no longer going to work!
Wow. Thanks MJTNET and Gammy. I'm trying the secpol.msc, disable running as standard user, and reboot. I'll have info tomorrow as to whether or not VT will run this way (using admin/admin and no UAC).
Keep us posted.
< ...tim >
It's working...! Visual Test Automation is functional on Vista.
SetWindowsHookEx and JournalRecordProc
Dwarvend
However, I have now got in touch with the Vista UAC team at Microsoft.
They are looking at it and are gonna let me know what we need to do to get this working. I'll keep you posted.
M
Justin Lindh
arithie
Wow. Thanks MJTNET and Gammy. I'm trying the secpol.msc, disable running as standard user, and reboot. I'll have info tomorrow as to whether or not VT will run this way (using admin/admin and no UAC).
Keep us posted.
< ...tim >
Pankaj.Patel
However, I did try launching setting a test app on 5308 to "run as administrator" and the hooks were still refused. Back on 5270 I even tried logging on as the built-in Administrator and running the test app - still no dice.
Of course it's very possible I did something wrong - it'll be good to see if you have more luck - please post up your findings!
Rafiq
Please can someone from MS tell us definitively whether we have to start recoding our software if it uses JournalRecordProc
Dave Speck
I signed up for the buddy program a month ago, primarily because I need to find a way to actually get some proper help in this matter and I was getting no response here, but, guess what, I have had NO response from that either. So much for the buddy program. Here we are doing our utmost to use the official channels of communication and getting NOWHERE.
Can someone please provide an official answer. What has changed here and what are we supposed to do make these functions work, our software DEPENDS on them!!!
Dan Rasmussen
I am looking for an answer to this also.
When I call SetWindowsHookEx specifying Journal record I get an access denied error.
Other hooks such as low level mouse seem to work fine.
Does anyone have any infomration on this
thanks,
tim
Corey Mingo
Well, I followed the instructions in that article to the letter. No luck. It actually gets worse.
I am logged in as an administrator. I modified my EXE with PE Resource Explorer and changed the manifest resource to include the security attributes as in the example. I checked that I didn't mess up by running it in XP and it ran fine. When I run it in Vista I now get "Access Denied" on the command line! I then changed the manifest resource completely by replacing the entire resource entry with the whole sample from the article. Same thing - "Access Denied".
M :-(
dotDavid
The documented restriction that JournalRecord can't record activity involving a higher privilege process makes sense, and that alone will probably force a lot of apps to be changed, since the requirement to run with admin privs will be a turn off for many potential buyers. But, fair enough - MS wants to tighten up security.
However, the fact that you can't set a JournalRecord period even when you are apparently running the app as an Administrator doesn't seem to square up. I mean, setting something to run as Admin should be the same (for that app) as the secpol change to stop all apps running as standard user. Or am I missing something
Anyway, the documented restriction is probably enough to make me swap JournalRecord for the low level input hooks (which do work), and "fake" playback using SendInput or similar.
But at least MS has made work for itself as well as the rest of us. It'll either have to let Visual Test die (and annoy a great many test labs in the process) or recode it themselves so that it can work on Vista...
wyatt blake
WH_GETMESSAGE fails with access denied as do the journaling hooks.
Does anybody have any update on this
Tony Bass
wgpubs
Please can someone confirm whether this is just not yet supported or if we will have to recode this for the final release
Kong-How
http://msdn.microsoft.com/windowsvista/default.aspx pull=/library/en-us/dnlong/html/AccProtVista.asp
A lower privilege process cannot:
- Perform a window handle validation of higher process privilege.
- SendMessage
or PostMessage to higher privilege application windows. These
application programming interfaces (APIs) return success but silently
drop the window message.
- Use thread hooks to attach to a higher privilege process.
- Use Journal hooks to monitor a higher privilege process.
Having read this article I think I understand it that all processes run as lower privilege processes unless otherwise instructed via the new requestedExecutionLevel element of the manifest file.So to solve this issue it would appear the user will have to be an administrator and you would need to include the new manifest instruction.
Haven't tried it yet, but will report back when I have.
If this is the only solution it is a bit of a nightmare as it means users must be admins to run the software! I hope someone at Microsoft does eventually take the time to read this thread (it would appear Microsoft ignore this forum) and considers allowing journal hooks in regular processes otherwise a whole host of existing applications are no longer going to work!
M/
DigitalMan2112
It's working...! Visual Test Automation is functional on Vista.