Import registry before running.

Issues related to Enigma Virtual Box
Post Reply
ococlk
Posts: 6
Joined: Thu May 23, 2024 1:39 pm

Import registry before running.

Post by ococlk »

Hello, the program I am about to package needs to write the path in the registry. I used another packaging program before, which allows batch scripts to be executed before the program runs, so I wrote a simple batch script to ensure that the correct path can be identified (the script is placed at the end).

I am now preparing to switch to Enigma Virtual Box for packaging, and I noticed that there is a virtual registry function. But I don't know how it is used and whether it can achieve this effect?

Code: Select all

@echo off
%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("""%~f0""","::",,"runas",1)(close) & exit /b
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Ludashi" /v "Setup Path" /t REG_SZ /d ""%~dp0    /f
Enigma
Site Admin
Posts: 2992
Joined: Wed Aug 20, 2008 2:24 pm

Re: Import registry before running.

Post by Enigma »

Hi, let me explain how EVB could be effective in your case.

You are trying to run application and create a registry key. The way you are doing that through a batch file - won't work. The problem is that changes, that are made within a virtual registry, are not shared between all running processes. In your case, you run two separate processes, one - application execution, second - registry changes. First process nothing knows about the second and vice versa.

The only one correct way for you is the following:
1. You need to pack the application that is being run in ShellExecute directly, i.e. select it as an Input file in EVB
2. In EVB, you need to enable registry virtualization and simply add the necessary registry path in EVB.
This way, application #1 will always see the virtual key #2 like it is key in real registry.
ococlk
Posts: 6
Joined: Thu May 23, 2024 1:39 pm

Re: Import registry before running.

Post by ococlk »

Before verification, I encountered another problem. The runtime could not load library libcef.dll, which caused the program to fail to start, even though process sharing was enabled.
Enigma
Site Admin
Posts: 2992
Joined: Wed Aug 20, 2008 2:24 pm

Re: Import registry before running.

Post by Enigma »

Please send us sample at support@enigmaprotector.com, we will try to check it out.
ococlk
Posts: 6
Joined: Thu May 23, 2024 1:39 pm

Re: Import registry before running.

Post by ococlk »

Sorry for the delay, the sample has been sent to your email.
Post Reply