Some operating systems use a registry to store system settings, user settings, operating system options, as well as other information. The registry is a database, in a form of a hierarchically-structured data store, which may include information pertaining to hardware, operating system software, application software, and settings per user.
The registry may include keys and values. Registry keys are analogous to folders or directories and values are analogous to files. Each registry key may include one or more other registry keys (subkeys) and/or one or more values. For example, a Windows operating system, available from Microsoft Corporation of Redmond, Wash., may have a registry key path of “HKEY_LOCAL_MACHINE\Software\Microsoft\Windows”, which refers to a key “Windows”, which is a subkey of a key “Microsoft”, which is a subkey of a key “Software”, which is a subkey of a key “HKEY_LOCAL_MACHINE”. A registry value may have a name and data associated with the name.
Software applications may expect installation metadata, such as values (e.g., registry files) or registry entries to be in particular locations. If the registry files or registry entries are not in the particular locations, then a software application may not function correctly.
Some operating systems may be 32-bit operating systems and other operating systems may be 64-bit operating systems. Typically, a 32-bit application may execute on a processing device running a 32-bit operating system and a 64-bit application may execute a processing device running a 64-bit operating system.
A virtual application may be an application packaged to execute in a virtual environment. For example, a 32-bit virtual application may execute on a subsystem for executing 32-bit virtual applications. The subsystem may be included within a 64-bit operating system running on a processing device. One example of such a subsystem is WOW64, which is a subsystem of a 64-bit Windows operating system. Because 32-bit applications and 64-bit applications may coexist on one processing device, use of a particular registry key path by a 32-bit application and a 64-bit application on one processing device may cause one or both of the 32-bit application and the 64-bit application to function incorrectly.
In order to solve this problem, 32-bit applications packaged to execute on a processing device running a 64-bit operating system may refer to one or more particular registry key paths that are different than corresponding registry key paths used by 64-bit applications. For example, a 64-bit application packaged to execute on a processing device running a 64-bit operating system and a 32-bit application packaged to execute on a processing device running a 32-bit operating system may refer to a registry key path of “Registry\HKLM\Software\Contoso”. However, a 32-bit virtual application packaged to execute on a processing device running a 64-bit operating system, with a subsystem for executing 32-bit applications, may be packaged such that the 32-bit virtual application refers to a modified version of the above-mentioned registry key path, such as, for example, “Registry\HKLM\Software\Wow6432Node\Contoso” or other registry key path.
Because one or more modified registry key paths may be used by a 32-bit virtual application when executing on a processing device having a 64-bit operating system, for the 32-bit virtual application to function properly on the processing device, the 32-bit virtual application may be packaged specifically, as a virtual application, for execution on the processing device having the 64-bit operating system. When the 32-bit virtual application is to be executed on a processing device having another operating system, such as a 32 bit operating system, the 32-bit virtual application may be packaged specifically for execution on the processing device having the 32-bit operating system (i.e., no registry key paths may be modified).
Enterprises with an existing library of 32-bit applications may repackage each of the 32-bit applications, as virtual applications, for execution on a processing device with a 64-bit operating system if the 32-bit applications are to run properly on the processing device with the 64-bit operating system. If the existing library of 32-bit applications are also to be executed on a second processing device having a new version of a 64-bit operating system, the 32-bit applications may be repackaged as virtual applications to execute on the second processing device having the new version of the 64-bit operating system (i.e., one or more registry key paths may be modified differently than the one or more registry key paths would be modified for execution on a processing device running a different version of the 64-bit operating system).
Maintaining an application that is repackaged multiple times to execute properly as virtual applications in a number of different executing environments on various processing devices may be time consuming and expensive.
This Summary is provided to introduce a selection of concepts in a simplified form that is further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In embodiments consistent with subject matter of this disclosure, a processing device having a first executing environment may execute a virtual application packaged to execute in a second executing environment, which is different from the first executing environment. Applications packaged to work in the first executing environment and virtual applications packaged to work in the second executing environment may read, write, or modify one or more locations within a hierarchically-structured data store. The one or more locations may be specified via respective key paths of the hierarchically-structured data store. Before installing a virtual application on the processing device, installer metadata associated with the virtual application may be extracted. The extracted installer metadata may include a reference to one or more key paths of the hierarchically-structured data store. At least some of the one or more key paths in the extracted installer metadata may be modified based on an executing environment of the processing device. The modified extracted installer metadata may be provided to an installer, which may create one or more key paths of the hierarchically-structured data store based on the provided modified extracted installer metadata.
During execution of the virtual application, a request, from the virtual application, to read, write, or modify the hierarchically-structured data store may be intercepted to determine whether the request includes a reference to a key path of the hierarchically-structured data store, which is to be modified. If so, the reference to the key path may be modified based on the executing environment detected in the processing device. Similarly, a response to the request from the virtual application may be intercepted to determine whether the intercepted response includes a reference to a key path of the hierarchically-structured data store to be modified back to an original key path included in the request. If the reference to the key path included in the intercepted response is to be modified, then the key path may be modified to the original key path included in the request. The modified intercepted response may be released, such that the virtual application may receive the modified intercepted response.
In some embodiments, the detected executing environment of the processing device may be matched to one of a number of sets of rules. Each of the sets of rules may include information regarding a mapping of a first key path of the hierarchically-structured data store to a second key path of the hierarchically-structured data store and vice versa.
In order to describe the manner in which the above-recited and other advantages and features can be obtained, a more particular description is provided below and will be rendered by reference to specific embodiments thereof which are illustrated in the appended drawings. Understanding that these drawings depict only typical embodiments and are not therefore to be considered to be limiting of its scope, implementations will be described and explained with additional specificity and detail through the use of the accompanying drawings.
Embodiments are discussed in detail below. While specific implementations are discussed, it is to be understood that this is done for illustration purposes only. A person skilled in the relevant art will recognize that other components and configurations may be used without parting from the spirit and scope of the subject matter of this disclosure.
In embodiments consistent with the subject matter of this disclosure, an application may be packaged as a 32-bit virtual application for execution on a processing device running a 32-bit operating system. The 32-bit virtual application may execute on either a processing device running a 32-bit operating system or a processing device running a 64-bit operating system without repackaging the virtual application.
In various embodiments, installer metadata associated with a virtual application may be extracted from the packaged virtual application. The installer metadata may include information regarding a number of keys of a hierarchically-structured data store, such as, for example, a registry, or other hierarchically-structured data store. At least one key path, included in the extracted installer metadata, may be modified based on a detected executing environment for the virtual application on a processing device. The modified extracted installer metadata may be provided to an installer, which may create at least one key path in the hierarchically-structured data store. The at least one key path may correspond to the modified extracted installer metadata.
When the virtual application is executed, a request, from the virtual application, to read, write, or modify a value in the hierarchically-structured data store may be intercepted. The request may be analyzed to determine whether the request includes a reference to one of the at least one key path. If the request includes the reference, then the reference to the one of the at least one key path may be modified, as defined for the executing environment on the processing device. The modified request may then be processed to read, write, or modify a value in the hierarchically-structured data store at a location defined by the modified one of the at least one key path.
A response to the modified request may be intercepted and analyzed to determine whether the response includes a second reference to one of at least one modified key path of the hierarchically-structured data store. If the response includes the second reference, then the second reference to the one of the at least one modified key path may be modified back to the one of the at least one key path included in the request before being modified. The response including the modified second reference may then be provided to the virtual application.
In some embodiments, an executing environment of a processing device may be detected by reading a particular memory address or group of memory addresses, by accessing a location of a hierarchically-structured data store, such as, for example, a registry or other hierarchically-structured data store, or by other methods. The detected executing environment may then be matched to one of a number of sets of rules for a number of executing environments. When the detected executing environment matches one of the number of sets of rules, the matching one of the number of sets of rules may include information for mapping a first key path referenced by a virtual application to a second key path based on the detected executing environment. In some embodiments, the sets of rules may include one or more modifiers for use in modifying one or more key path references of a hierarchically-structured data store.
For example, a set of rules matching to an executing environment including version 2.3 of a 64-bit operating system may have a modifier indicating that a request having a key path of “Registry\HKLM\Software\Contoso” is to be modified to have a key path of “Registry\HKLM\Software\Wow6432Node\Contoso”. Conversely, the modifier may indicate that a response to a request, having a key path of “Registry\HKLM\Software\Wow6432Node\Contoso”, is to be modified to have a key path of “Registry\HKLM\Software\Contoso”. A second set of rules matching an executing environment including version 3.0 of a 64-bit operating system may have a second modifier indicating that a request having a key path of “Registry\HKLM\Software\Contoso” is to be modified to have a key path of “Registry\HKLM\Software\Bam7865Dev\Contoso”. Conversely, the second modifier may indicate that a response to a request, having a key path of “Registry\HKLM\Software\ Bam7865Dev\Contoso”, is to be modified to have a key path of “Registry\HKLM\Software\Contoso”.
Processor 120 may include one or more conventional processors that interpret and execute instructions. A memory may include RAM 130, ROM 140, or another type of dynamic or static storage device that stores information and instructions for execution by processor 120. RAM 130, or another type of dynamic storage device, may store instructions as well as temporary variables or other intermediate information used during execution of instructions by processor 120. ROM 140, or another type of static storage device, may store static information and instructions for processor 120.
Input device 150 may include a keyboard, a pointing device, an electronic pen, a touchscreen, or other device for providing input. Output device 160 may include a display, a printer, or other device for outputting information. Storage device 165 may include a disk and disk drive, an optical medium, or other medium for storing data and/or instructions.
Processing device 100 may perform functions in response to executing sequences of instructions contained in a tangible machine-readable medium, such as, for example, RAM 130, ROM 140 or other medium. Such instructions may be read into RAM 130 from another machine-readable medium or from a separate device via a communication interface (not shown).
Before launching installer 408 to install a virtual application, which may be packaged to execute on a processing device having an executing environment including a 32-bit operating system, extractor 404 may extract installer metadata from the packaged virtual application. The extracted installer metadata may then be provided to metadata modifier 406.
Executing environment detector 402 may detect the executing environment of the processing device by checking a value in a hierarchically-structured data store, such as a registry or other hierarchically-structured data store, checking a particular memory location or group of memory locations, or by other methods. Executing environment detector 402 may then determine a mapping from a first key path referenced by a virtual application to a second key path by matching the detected executing environment to one set of rules from among a number of sets of rules. Each of the sets of rules may include one or more modifiers for modifying one or more key paths of the hierarchically-structured data store for respective executing environments. Executing environment detector 402 may set one or more modifiers for use by metadata modifier 406 based on the one or more modifiers from a matching set of rules.
Metadata modifier 406 may determine whether any key paths, corresponding to any of the one or more modifiers, is present in the extracted installer metadata. If so, then metadata modifier 406 may modify the present key paths, corresponding to the one or more modifiers, as indicated by the one or more set modifiers. For example, a modifier may indicate that a key path of “HKLM\ROOT\SOFTWARE\CONTOSO” is to be modified to “HKLM\ROOT\SOFTWARE\WOW6432NODE\CONTOSO”. Metadata modifier 406 may provide the modified extracted installer metadata to installer 408, which may create one or more key paths of the hierarchically-structured data store as part of a process for installing the packaged virtual application.
As previously mentioned, before executing the virtual application, executing environment detector 402 may detect an executing environment of the processing device by checking a value in a hierarchically-structured data store, such as a registry or other data store, checking a particular memory location or group of memory locations, or by other methods. Executing environment detector 402 may then match the detected executing environment to one of a number of sets of rules. Each of the sets of rules may include one or more modifiers for modifying one or more key paths of the hierarchically-structured data store for respective executing environments. Executing environment detector 402 may then provide one or more modifiers from a matching set of rules to first interpreter 504 and second interpreter 506.
When executing virtual application 502 makes a request to read, write, or modify a value in the hierarchically-structured data store at a location specified by a first key path, first interceptor 504 may intercept the request and may determine whether the first key path included in the request matches a second key path included in one of the one or more modifiers. If the first key path included in the request does match the second key path in one of the one or more modifiers, then first interceptor 504 may modify the first key path as indicated by the matching one of the one or more modifiers. First interceptor 504 may then release the modified request, such that the modified request may be processed to read, write, or modify a location of the hierarchically-structured data store specified by the modified key path.
Second interceptor 506 may intercept a response to the modified request and may determine whether a third key path included in the response matches a fourth key path in one of the one or more key paths of the one or more modifiers. If the third key path does match the fourth key path in one of the one or more key paths of the one or more modifiers, then second interceptor 506 may modify the third key path of the response as indicated by the matching one of the one or more modified modifiers, such that the modified fourth key path included in the response matches an original key path of the request, before being modified. Second interceptor 506 may then release the modified response, such that the modified response may be received by executing virtual application 502. Thus, from a point of view of executing virtual application 502, requests to read, write, or modify a value within the hierarchically-structured data store are sent and received. However, a recipient of the requests may receive the requests with one or more modified key paths and may provide corresponding responses including the one or more modified key paths. Corresponding responses may be modified such that one or more key paths included in a respective response may match an original key path included in a corresponding request before the respective responses are provided to executing virtual application 502.
As one can see, in various embodiments, first interceptor 504 and second interceptor 506, respectively, may modify requests and responses, transparently with respect to executing virtual application 502.
Executing environment detector 402 may then attempt to match the detected executing environment to one of one or more sets of executing environment rules (act 606). Each of the one or more sets of executing environment rules may include one or more modifiers and an executing environment indicator that provides an indication of a particular executing environment. Each of the one or more modifiers may include a first key path as may be referenced by a virtual application and a second key path representing a modified first key path.
Executing environment detector 402 may determine if a matching one of the one or more sets of executing environment rules was found (act 608). If the matching one of the one or more sets of executing environment rules was found, then executing environment detector 402 may determine a mapping from a reference to a first key path to a reference to a second key path by setting one or more modifiers (act 610). The one or more modifiers may be set by copying the one or more modifiers from the matching one of the one or more sets of executing environment rules. Metadata modifier 406 may then modify the extracted installer metadata by changing key paths, which match a first key path of the copied one or more modifiers to a corresponding second key path of the copied one or more modifiers (act 612). The modified extracted installer metadata may then be provided to installer 408, which may create key paths in a hierarchically-structured data store based on the modified extracted installer metadata.
If, during act 608, executing environment detector 402 determines that a matching one of the one or more sets of executing environment rules was not found, then an assumption may be made that no key paths included in the extracted installer metadata may be modified and the extracted installer metadata may be provided unchanged to installer 408 (act 614).
The process may begin with exemplary environment detector 402 detecting an executing environment on a processing device (act 702). As previously mentioned, the executing environment may be detected by reading a specific location within a hierarchically-structured data store, such as, for example, a registry or other hierarchically-structured data store, by reading a particular memory address or a particular group of memory addresses, or by another method.
Executing environment detector 402 may determine a mapping from a first key path referenced by a virtual application to a second key path based on the detected executing environment by attempting to match the detected executing environment to one of one or more sets of executing environment rules (act 704). As previously mentioned, each of the one or more sets of executing environment rules may include one or more modifiers and an executing environment indicator that provides an indication of a particular executing environment. Each of the one or more modifiers may include a key path as may be referenced by a virtual application and a key path representing a modified key path. Thus, each of the one or more modifiers of the one or more sets of executing environment rules may define a first key path, which may be referenced by a virtual application, and a corresponding second key path, representing a modified first key path.
Executing environment detector 402 may determine if a matching one of the one or more sets of executing environment rules was found (act 706). If the matching one of the one or more sets of executing environment rules was found, then executing environment detector may set one or more modifiers by copying the one or more modifiers from the matching one of the one or more sets of executing environment rules (act 708). The process may then be completed.
If, during act 706, executing environment detector 402 determines that a matching one of the one or more sets of executing environment rules was not found, then an assumption may be made that no key paths may be modified and an indicator may be set to indicate an absence of modifiers (act 710). The process may then be completed.
The process may begin with first interceptor 504 determining whether at let one modifier was set during act 708 (act 802). If the at least one modifier was not set, then first interceptor 504 may be completed and the intercepted request may be released for processing to continue.
If, during act 802, first interceptor 504 determines that at last one modifier was set, then first interceptor 504 may attempt to find a key path, within the intercepted request, that matches one of the at least one modifier (act 804). First interceptor 504 may then determine whether a matching key path was found (act 806). If the matching key path was found, then first interceptor 504 may modify the found key path in the intercepted request as indicated by a corresponding one of the at least one modifier (act 808) and the intercepted request may be released for processing to continue.
If, during act 806, first interceptor 504 determines that the matching key path was not found, then the intercepted request may be released for processing to continue.
The flowchart of
The process may begin with second interceptor 506 determining whether at least one modifier was set during act 708 (act 802). If the at least one modifier was not set, then second interceptor 506 may release the intercepted response such that the intercepted response may be received by executing virtual application 502.
If, during act 802, second interceptor 506 determines that the at last one modifier was set, then second interceptor 506 may attempt to find a key path within the intercepted response that matches a key path included in one of the at least one modifier, representing a modified key path (act 804). Second interceptor 506 may then determine whether a matching key path, within the intercepted response, was found (act 806). If the matching key path was found, then second interceptor 506 may modify the found key path in the intercepted request, as indicated by an unmodified key path included in the matching one of the at least one modifier and the intercepted response may be released, such that executing virtual application 502 may receive the modified response (act 808).
If, during act 806, second interceptor 506 determines that the matching key path was not found, then the intercepted response may be released for executing virtual application 502 to receive the response.
Although the above exemplary embodiments refer to a 32-bit virtual application executing in an executing environment including a 64-bit operating system, other embodiments may include a virtual application packaged for any particular executing environment and executing the virtual application in an executing environment different from an executing environment for which the virtual application was packaged.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms for implementing the claims.
Other configurations of the described embodiments are part of the scope of this disclosure. For example, in other embodiments, an order of acts performed by a process, such as the processes illustrated in
Accordingly, the appended claims and their legal equivalents define embodiments, rather than any specific examples given.
Number | Name | Date | Kind |
---|---|---|---|
5968136 | Saulpaugh et al. | Oct 1999 | A |
6253240 | Axberg et al. | Jun 2001 | B1 |
6922735 | Chang | Jul 2005 | B2 |
7171543 | Ronen et al. | Jan 2007 | B1 |
7260702 | Vega et al. | Aug 2007 | B2 |
7406676 | Khalid et al. | Jul 2008 | B2 |
7818160 | Collins et al. | Oct 2010 | B2 |
20060048136 | Vries et al. | Mar 2006 | A1 |
20060282606 | Radhakrishnan et al. | Dec 2006 | A1 |
20070050487 | Pravat et al. | Mar 2007 | A1 |
20080133789 | McNutt et al. | Jun 2008 | A1 |
20110314187 | Albrecht et al. | Dec 2011 | A1 |
Entry |
---|
“WOW64”, Retrieved at<<http://en.wikipedia.org/wiki/WOW64>>, From Wikipedia, the free encyclopedia, pp. 2. |
Posey Brien M. “Run 32-bit Applications on x64 Windows Servers”, Retrieved at<<http://searchwindowsserver.techtarget.com/tip/0,289483,sid68—gci1218185,00.html>>, Sep. 27, 2006, pp. 4. |
“64-bit”, Retrieved at<<http://en.wikipedia.org/wiki/64-bit>>, From Wikipedia, the free encyclopedia, pp. 8. |
“Introduction to Developing Applications for the 64-bit Itanium-based Version of Windows”, Retrieved at<<http://msdn.microsoft.com/en-us/library/ms952405.aspx>>, Windows Server 2003 Technical Articles, Jun. 2003, pp. 18. |
Cleveland Sean,“Advanced Micro Devices, Inc.x86-64TM Technology White Paper”, Retrieved at<<http://www.weblearn.hs-bremen.de/risse/RST/docs/amd64.pdf>>, pp. 1-36. |
Number | Date | Country | |
---|---|---|---|
20100287313 A1 | Nov 2010 | US |