Page 1 of 1

Import registry before running.

Posted: Wed Jun 12, 2024 6:47 am
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

Re: Import registry before running.

Posted: Fri Jun 14, 2024 10:13 am
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.

Re: Import registry before running.

Posted: Sat Jun 15, 2024 9:25 am
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.

Re: Import registry before running.

Posted: Mon Jun 17, 2024 6:37 am
by Enigma
Please send us sample at support@enigmaprotector.com, we will try to check it out.

Re: Import registry before running.

Posted: Sun Jul 07, 2024 1:07 pm
by ococlk
Sorry for the delay, the sample has been sent to your email.