locked
Can I use app-v for this? RRS feed

  • Question

  • We have a 16 bit in-house app that we are trying to run on windows 7. Certain functions of this app will not run on Windows 7 if UAC is enabled.  I ran the application using standard user analyzer and found that it fails on the below:

    SetWindowsHookExA 1 (WH_JOURNALPLAYBACK) called to set a global Windows hook.

    SetWindowsHookExA 1 (WH_JOURNALPLAYBACK) failed to set a Windows hook with error 0x5.

     

    I have no experience with app-v. Would it be possible to package this application as an app-v package?

    I know med-v is probably what we need to to, but wanted to see if it was possible with app-v.

     

    Thank You

     

     

     

    Wednesday, October 12, 2011 4:24 PM

Answers

  • We have a 16 bit in-house app that we are trying to run on windows 7. Certain functions of this app will not run on Windows 7 if UAC is enabled.  I ran the application using standard user analyzer and found that it fails on the below:

    SetWindowsHookExA 1 (WH_JOURNALPLAYBACK) called to set a global Windows hook.

    SetWindowsHookExA 1 (WH_JOURNALPLAYBACK) failed to set a Windows hook with error 0x5.

     

    SetWindowsHookEx apparently tries to inject DLLs into another process (http://msdn.microsoft.com/en-us/library/windows/desktop/ms644990(v=vs.85).aspx) and error code 0x5 means ERROR_ACCESS_DENIED. Which would suggest that normal user don't have enough privileges to start hooking other process.
    Not to mention if it even works otherwise, from the linked article:

     

    A 32-bit DLL cannot be injected into a 64-bit process, and a 64-bit DLL cannot be injected into a 32-bit process. If an application requires the use of hooks in other processes, it is required that a 32-bit application call SetWindowsHookEx to inject a 32-bit DLL into 32-bit processes, and a 64-bit application call SetWindowsHookEx to inject a 64-bit DLL into 64-bit processes. The 32-bit and 64-bit DLLs must have different names.

    If your 16-bit program tries to hook 32-bit processes on the system, that likely does not work..

    As I don't know more about your program, it's impossible to speculate if this holds true or not. But at the minimum you need to have user account that has more privileges enabled for it (maybe "Debug programs" local security privilege?); for that purpose using app compatibility kit or App-V does not make any difference.

     


    br,
    Kalle Saunamäki
    http://blog.gridmetric.com/
    Tuesday, October 18, 2011 9:56 AM
    Moderator

All replies

  • Hello,

    You would probably have more luck using parts of the Application Compability Toolkit.


    If you want to try App-V, download it from MSDN / Technet (available as part of MDOP) or you can download the RDS-client to try it on a RDS-host;

    http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=22011

     


    /Znack
    Wednesday, October 12, 2011 4:55 PM
  • Thanks for the reply.

    If I'm not mistaken, the  Application Compability Toolkit does not allow any fixes to 16-bit applications?

    I did try and ran into the same error message listed on the below page.

    http://blogs.catapultsystems.com/arafels/archive/2011/03/16/16-bit-applications-are-not-supported-in-the-microsoft-compatibility-administrator.aspx

    Could you please explain what you mean by RDS-Client to rds-host?

    Thank You

    Wednesday, October 12, 2011 5:03 PM
  • Hello,

    ahh, yes you are right.

    App-V has two types of clients. One for Windows desktop OS:es (only available via MSDN / Technet / licensing-site) and one for Remote Desktop Services-hosts (see above link).
    /Znack
    Wednesday, October 12, 2011 5:16 PM
  • We have a 16 bit in-house app that we are trying to run on windows 7. Certain functions of this app will not run on Windows 7 if UAC is enabled.  I ran the application using standard user analyzer and found that it fails on the below:

    SetWindowsHookExA 1 (WH_JOURNALPLAYBACK) called to set a global Windows hook.

    SetWindowsHookExA 1 (WH_JOURNALPLAYBACK) failed to set a Windows hook with error 0x5.

     

    SetWindowsHookEx apparently tries to inject DLLs into another process (http://msdn.microsoft.com/en-us/library/windows/desktop/ms644990(v=vs.85).aspx) and error code 0x5 means ERROR_ACCESS_DENIED. Which would suggest that normal user don't have enough privileges to start hooking other process.
    Not to mention if it even works otherwise, from the linked article:

     

    A 32-bit DLL cannot be injected into a 64-bit process, and a 64-bit DLL cannot be injected into a 32-bit process. If an application requires the use of hooks in other processes, it is required that a 32-bit application call SetWindowsHookEx to inject a 32-bit DLL into 32-bit processes, and a 64-bit application call SetWindowsHookEx to inject a 64-bit DLL into 64-bit processes. The 32-bit and 64-bit DLLs must have different names.

    If your 16-bit program tries to hook 32-bit processes on the system, that likely does not work..

    As I don't know more about your program, it's impossible to speculate if this holds true or not. But at the minimum you need to have user account that has more privileges enabled for it (maybe "Debug programs" local security privilege?); for that purpose using app compatibility kit or App-V does not make any difference.

     


    br,
    Kalle Saunamäki
    http://blog.gridmetric.com/
    Tuesday, October 18, 2011 9:56 AM
    Moderator
  • The application will not work unless you disable UAC, does not matter if you are an admin or a regular user.

     

    Thanks

    Wednesday, October 19, 2011 3:21 AM
  • The application will not work unless you disable UAC, does not matter if you are an admin or a regular user.

    Then App-V don't directly offer any solution to this, I think. Only thing that I can think of that UAC would do (if we leave the whole admin-thing aside) vs. UAC not enabled is the filesystem & registry virtualization that is applied to application which is not manifested otherwise.

    Have you tried to disable only that security policy option on the client ("User Account Control: Virtualize file and registry write failures to per-user locations")?

     


    br,
    Kalle Saunamäki
    http://blog.gridmetric.com/
    Wednesday, October 19, 2011 5:34 AM
    Moderator
  • Have you tried to disable only that security policy option on the client ("User Account Control: Virtualize file and registry write failures to per-user locations")?

     

    Yes, that didn't help either.
    Wednesday, October 19, 2011 12:45 PM