You are here

[Solved] How do portable apps use default registry settings?

3 posts / 0 new
Last post
Last seen: 2 months 1 week ago
Joined: 2014-12-31 09:15
[Solved] How do portable apps use default registry settings?


I have been attempting to make a game I play portable using the PortableApps Launcher Generator and this website's documentation. The only thing I really need to do to make the game portable is to redirect some registry accesses.

I eventually managed to create a launcher which I thought was what I needed. Unfortunately, I have been having problems running the game and I have narrowed them down to the initial registry settings. Basically, when the game is installed, the installer creates some registry entries which have to be present for the game to run properly.

I have seen that some of the portable apps I have looked at have registry keys stored in the App/DefaultData/Settings folder that are presumably integrated into the Data/Settings folder's registry but I couldn't find anything in the documentation concerning this. I attempted to create a registry file in the App/DefaultData/Settings folder that looked the same as how other portable apps had it but the keys from that file are not being stored in the Data/Settings folder's registry file.

This is the contents of the App/DefaultData/Settings registry file:
Windows Registry Editor Version 5.00

"FolderPath"="C:\\Users\\Admin\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Westwood\\Emperor - Battle For Dune"


This is the contents of the Data/Settings registry file after opening the game's Portable Apps launcher:
Windows Registry Editor Version 5.00






"Persona"=" - - "
"Server"=" - - "



As you can see, the registry keys from the DefaultData registry file are not being saved into the Data registry file.

If it helps, here are, I think, the relevant entries in my Launcher's INI file:


HKLM\SOFTWARE\Wow6432Node\Westwood\Emperor\FolderPath=REG_SZ:%PAL:AppDir%\Start Menu\Westwood\Emperor - Battle For Dune

On a side note, I have three registry keys in my Launcher INI that are supposed to be edited every time the launcher is run. I don't, however, see these keys being stored in the Data folder's registry file. Is this supposed to be happening or is this another problem that needs to be fixed?

Help will be greatly appreciated.

Last seen: 7 years 2 months ago
Joined: 2015-01-22 11:17
Possible Help

I think one of your issues is that, in order to use [RegistryValueWrite] to write to HKLM, you need to have Admin privileges; you can force the launcher to run as admin by adding the line RunAsAdmin=force under [Launch] in your launcher.ini (unless you've already done that).

I've recently been tinkering with portability. So far I just "finished" a portable version of RCT2 Triple Thrill Pack. I say "finished" because I would like to figure out if it's possible to have the game run with HKCU registry keys instead of HKLM (to avoid running as Admin). In order to run the game, it needed to write a few keys to the registry; the version I made portable is a Steam version, and oddly enough when you run the game through Steam, it writes registry keys along with infogrames keys, almost like a no-CD crack. If you would like to take a look at my launcher.ini, here's a link to the paste:

Keep looking into:
if needed.

Last seen: 2 months 1 week ago
Joined: 2014-12-31 09:15
Solution discovered

I eventually found the reason my registry settings weren't working. First, I was actually doing everything correctly in my OP. The registry file I created was correct, the launcher INI was correctly configured and the registry file is placed in the location I mentioned. The problem was actually the game itself. When you type the game's serial key into the setup program, the program stores that key in your registry. However, the setup program encodes that key in an unknown manner using a number of pieces of data, one of which is the location you installed the game. When you run the game, it does some sort of test on that encoded serial key in the registry and the game crashes if the test fails. This is why I was having problems. I didn't install the game to the PortableApps folder I created for it and so the serial was not encoded correctly.

I'm not sure if you are still trying to finish your portable RCT2 project but I was actually trying to do the same thing with the game in my OP (Emperor: Batlle for Dune). A few months ago, I started seriously researching exactly what you wanted here: converting the game's HKLM registry access to HKCU and found the way to do it.

I gave an explanation here:

Log in or register to post comments