Adding registry keys in Virtual Package Editor setups

finalana's picture

Hello,

My initial problem description seems to be confusing. Since I don't want to fry more brains than absolutely necessary I'll try to isolate all the problems I run into and describe them one by one.
I want to create a setup that installs my application and the workspace virtualization agent. According to the documentation, this is done using the Virtual Package Editor. So I launched it and created a setup that puts an executable on disk (C:\win32app\altiris_test1\altiris_test1_v2.exe) and inserts an entry into the windows registry (HKEY_LOCAL_MACHINE\SOFTWARE\altiris_test1\mykey, value 42).
After adding a release and compiling it into altiris_test1_v2_Setup.exe, I run the installer. Afterwards, my executable on disk exists, but the registry key does not. How do I fix this?

EdT's picture

Regedit

If I recall correctly, regedit cannot see the registry keys added in a layer, if run from the base.
Add regedit.exe to your installation EXE and run it from the layer, then check for the registry key

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

finalana's picture

The executable that was

The executable that was installed by the setup (altiris_test1_v2.exe) does not see the registry key either. That should run from the layer, right?

EdT's picture

Permissions

First of all, if you open your virtualised package in the editor, can you see the registry key in there?

If so, does the user account that is activating the layer, have write permissions in the HKLM/Software key in the registry?  Virtualisation does not get around user permissions, so if you are working with a non-admin user account which does not have write permissions in HKLM then you won't be able to generate the key there.

So it could be a good move to experiment with the simplest possible virtual package that just deploys one registry key that you want to use as your marker.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

finalana's picture

Permissions

I can create this key when regedit is run from the base, so permissions should not be a problem.
I created a package that contains regedit.exe and creates the key HKLM\SOFTWARE\altiris_test1\mykey, by manually adding file and registry entries, not by using setup capture or importing a VSA file. The registry entry shows up and is still there when I close and reopen Virtual Package Editor. After running the setup, the registry entry does not show up in the virtualized regedit.

EdT's picture

Is it visible in the c:\fslrdr folder

The resources associated with a virtualised application can be found under the c:\fslrdr folder - there is a separate folder for the read only layer and for the writeable layer.
Check via Explorer whether you can see the resources your application has in it.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

finalana's picture

Registry entries not visible in C:\fslrdr

Using the search function in explorer I find regedit.exe in C:\fslrdr\5\[_B_]PROGRAMFILES[_E_]\reg_test. I can't find either "altiris_test1" nor "mykey" anywhere below C:\fslrdr.