locked
Read registry from outside the App-V bubble RRS feed

  • Question

  • How can I read and write to the registry inside an App-V bubble?

    I have some code that does some basic profile management, storing registry entries from certain HKEY_CURRENT_USER keys in a central file. This works fine when the applications are physically installed on a computer, but not for App-V applications.

    I understand that this is happening because of how the entire application is isolated within the bubble, but there must be a way to access the registry for each of these applications. How do profile management solutions like AppSense do it?

    Thanks

    Saturday, August 21, 2010 7:24 AM

Answers

  • You can use the REGISTRY keyword in the OSD file: http://www.tmurgent.com/OSD_Illustrated.aspx

     

    <REGISTRY>

    <REGKEY HIVE="HKLM" KEY="SOFTWARE\Test" NOREDIR="FALSE">

    <REGVALUE REGTYPE="REG_SZ" NAME="a_name"> a_string value</REGVALUE>

    <REGVALUE REGTYPE="REG_DWORD" NAME="a_32bit_valuename"> 64123</REGVALUE>

    <REGVALUE REGTYPE="REG_BINARY" NAME="a_binary_as_hex_pairs_valuename"> 50,51,52</REGVALUE>

    <REGVALUE REGTYPE="REG_SZ">some_string_that_becomes_value_of_the_default_of_the_key</REGVALUE>

    < REGVALUE REGTYPE="REG_SZ"></REGVALUE>

    </REGKEY>

    <REGISTRY>

     

    If you are using custom code, you can add scripts to OSD files: http://blogs.technet.com/b/appv/archive/2007/10/11/scripting-within-an-osd-file.aspx

     

    AppSense Environment Manager is able to see inside the bubble by loading a DLL into every executable via AppInit_DLLs in the registry, so it can into the bubble without using scripting.

     

    Saturday, August 21, 2010 8:39 AM
    Moderator
  • Hello,

    See the Flexprofiles way;

    http://www.softgridblog.com/?p=146

    /znack

    Saturday, August 21, 2010 9:00 AM
  • First thing that you could do is to use a PRE LAUNCH and POST SHUTDOWN script that runs your script inside the Virtual Environment (for loading and saving the settings). However, with App-V this might not be necessary, because App-V stores the User Configuration in a dedicated file in the User's Profile (or a user-specific folder) anyway.

    (As described at the locations linked above).

    FlexProfiles (and some other Profile solutions) basically do it the same way. AppSense, on th other hand, captures these settings differently: AppSense establishe File/Registry drivers (like App-V also does), and luckywise (for AppSense) Environment Manager can see the application's modifications before App-V redirects them.

     

     

     

     


    Falko
    Thursday, August 26, 2010 12:13 PM
    Moderator

All replies

  • You can use the REGISTRY keyword in the OSD file: http://www.tmurgent.com/OSD_Illustrated.aspx

     

    <REGISTRY>

    <REGKEY HIVE="HKLM" KEY="SOFTWARE\Test" NOREDIR="FALSE">

    <REGVALUE REGTYPE="REG_SZ" NAME="a_name"> a_string value</REGVALUE>

    <REGVALUE REGTYPE="REG_DWORD" NAME="a_32bit_valuename"> 64123</REGVALUE>

    <REGVALUE REGTYPE="REG_BINARY" NAME="a_binary_as_hex_pairs_valuename"> 50,51,52</REGVALUE>

    <REGVALUE REGTYPE="REG_SZ">some_string_that_becomes_value_of_the_default_of_the_key</REGVALUE>

    < REGVALUE REGTYPE="REG_SZ"></REGVALUE>

    </REGKEY>

    <REGISTRY>

     

    If you are using custom code, you can add scripts to OSD files: http://blogs.technet.com/b/appv/archive/2007/10/11/scripting-within-an-osd-file.aspx

     

    AppSense Environment Manager is able to see inside the bubble by loading a DLL into every executable via AppInit_DLLs in the registry, so it can into the bubble without using scripting.

     

    Saturday, August 21, 2010 8:39 AM
    Moderator
  • Hello,

    See the Flexprofiles way;

    http://www.softgridblog.com/?p=146

    /znack

    Saturday, August 21, 2010 9:00 AM
  • The user registry settings actually are being redirected to a temporary user hive that is ultimately committed to the user's PKG file:

    http://blogs.technet.com/b/appv/archive/2008/05/15/ms-app-virtualization-the-four-pkg-file-system-volumes.aspx

    Depending on the application, you may be able to bring the application inside the virtual environment similar to how we do it with Internet Explorer and when we leverage command prompts for troubleshooting.

     

    Wednesday, August 25, 2010 9:46 PM
  • First thing that you could do is to use a PRE LAUNCH and POST SHUTDOWN script that runs your script inside the Virtual Environment (for loading and saving the settings). However, with App-V this might not be necessary, because App-V stores the User Configuration in a dedicated file in the User's Profile (or a user-specific folder) anyway.

    (As described at the locations linked above).

    FlexProfiles (and some other Profile solutions) basically do it the same way. AppSense, on th other hand, captures these settings differently: AppSense establishe File/Registry drivers (like App-V also does), and luckywise (for AppSense) Environment Manager can see the application's modifications before App-V redirects them.

     

     

     

     


    Falko
    Thursday, August 26, 2010 12:13 PM
    Moderator