put_AllChangesAreVirtual
Description
Sets whether the packed executable stores all file system and registry changes inside the virtual environment instead of applying them to the real system.
When this option is enabled, all operations such as file creation, deletion, or registry modification occur virtually, keeping the host system unchanged.
This option is particularly useful for creating portable or sandboxed applications.
Syntax
HRESULT put_AllChangesAreVirtual([in] VARIANT_BOOL bValue);Parameters
bValue
Type: VARIANT_BOOL
[in] Pass VARIANT_TRUE to store all file and registry changes in the virtual environment, or VARIANT_FALSE to let them affect the real system.
Return Value
Returns an HRESULT.
S_OKif the option was set successfully.E_FAILor another COM error code if the operation fails.
Example
CComPtr<IBxProject> project;
if (SUCCEEDED(BxPackerApi_CreateProject(&project))) {
// Enable virtual changes mode
project->put_AllChangesAreVirtual(VARIANT_TRUE);
// Build the project afterward
// project->Build();
}Remarks
- When enabled, all changes made by the packed executable (files, registry, etc.) are virtualized and isolated.
- This allows the packed app to behave as if it has full access to the system, without leaving any traces.
- It is commonly used to build installation-free or portable software.
- The setting can be checked using get_AllChangesAreVirtual.