Import registry before running.
Posted: Wed Jun 12, 2024 6:47 am
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?
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