You are here

Strange registry problem with app

17 posts / 0 new
Last post
Flaver-D
Offline
Last seen: 7 months 2 weeks ago
Joined: 2016-09-20 15:44
Strange registry problem with app

Hi!
I'm trying to make a portable version of SmartMorph (http://meesoft.logicnet.dk/) and I'm running into a strange problem.
When I run the launcher file it doesn't save the registry entries to a file like it should.
I made the Launcher.ini file with the following entries

[Launch]
ProgramExecutable=\SmartMorph\SmartMop.exe
DirectoryMoveOK=None

[Activate]
Registry=true

[RegistryKeys]
SmartMorph_Portable1=HKEY_CURRENT_USER\SOFTWARE\MeeSoft\SmartMorph
SmartMorph_Portable2=HKEY_CURRENT_USER\SOFTWARE\MeeSoft\ImageAnalyzer
SmartMorph_Portable3=HKEY_CURRENT_USER\SOFTWARE\MeeSoft

[RegistryCleanupIfEmpty]
1=HKEY_CURRENT_USER\SOFTWARE\MeeSoft

but when I close the program making sure that there is a registry change (switch language), it just writes it to the computer...

Big question: what have I done wrong?

John T. Haller
John T. Haller's picture
Online
Last seen: 38 min 12 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Collision

Before doing anything else, there is a collision between 1 and 3 as well as between 2 and 3. SmartMorph_Portable3 already encompasses the first 2. It's a hierarchy like folders on your drive.

As for the latter, are you sure the app doesn't do multiple EXEs? If so, you need to use WaitForEXE1, etc in the launcher INI.

Sometimes, the impossible can become possible, if you're awesome!

JLim
Offline
Last seen: 1 week 1 day ago
Joined: 2013-07-17 01:30
Remove the line: SmartMorph

Remove the line: SmartMorph_Portable3=HKEY_CURRENT_USER\SOFTWARE\MeeSoft.
It is ok but suggest to use HKCU instead of HKEY_CURRENT_USER.

Flaver-D
Offline
Last seen: 7 months 2 weeks ago
Joined: 2016-09-20 15:44
I just did a few

I just did a few modifications to correct a few things and possibly put luck on my side. I corrected a bit of syntax and prevent multiple instances from running.

[Launch]
ProgramExecutable=\SmartMorph\SmartMop.exe
DirectoryMoveOK=Yes
SingleAppInstance=True
SinglePortableAppInstance=True

[Activate]
Registry=True

[RegistryKeys]
SmartMorph_Portable1=HKCU\Software\MeeSoft

[RegistryCleanupIfEmpty]
1=HKCU\Software\MeeSoft

But for some odd reason it still writes to the reg...
I also checked and the app folder contains a single exe...

François

Flaver-D
Offline
Last seen: 7 months 2 weeks ago
Joined: 2016-09-20 15:44
OK, this is getting to be

OK, this is getting to be really puzzling!
I checked what was linked to the Smartmop.exe file when it was running using Process Hacker and found nothing.
So, I added a few things to the ini file to see if it could help... this is what I now have.

[Launch] 
ProgramExecutable=SmartMorph\SmartMop.exe 
DirectoryMoveOK=Yes
SingleAppInstance=True
SinglePortableAppInstance=True
WaitForOtherInstances=True
WaitForProgram=True

[Activate]
Registry=True

[RegistryKeys] 
SmartMorph_Portable=HKEY_CURRENT_USER\Software\MeeSoft

[RegistryCleanupIfEmpty] 
1=HKEY_CURRENT_USER\Software\MeeSoft 

But it still has the same behavior. It's a bit like if the PortableApps launcher didn't want to read the registry or misread my ini file.
Anybody has any idea of what the heck is going on?

François

JLim
Offline
Last seen: 1 week 1 day ago
Joined: 2013-07-17 01:30
Give more info

Are u talking about SmartMorph v1.55? It is a very old app which release on 2004. i can't get it from the official site and get it from CNet.
If it is the one than I have some questions to ask.
This is a English only app. U said u switch language, Switch what language?
U make sure that there is a registry change. When? before or after the app exit?
What keys and values are written to the registry? Can u list it out?
Can u upload the packet u have made WITHOUT the app files in App/SmartMorph folder?

Flaver-D
Offline
Last seen: 7 months 2 weeks ago
Joined: 2016-09-20 15:44
The one is version 1.53 dated

The one is version 1.53 dated back in 2003 I had in my junk drive. But on the site it says it's been upgraded to another program called Popims Animator, so I might change to that and maybe it will work better.
The program switches from English to Danish. I was just using this to force a registry change and see what's going on.

I think I'm going to go for another try but this time with a more modern version. I think the older one might hook into the registry in a way that the Launcher doesn't see... I don't know how this would be but I know there are some weird things that are possible in Windows...

François

JLim
Offline
Last seen: 1 week 1 day ago
Joined: 2013-07-17 01:30
I made one with v1.55

I made one with v1.55 downloaded from http://download.cnet.com/SmartMorph/3000-2192_4-10264587.html.
My launcher ini is very similar to yours and do not find any problem.
btw I can't find any way to get Popims Animator.

Flaver-D
Offline
Last seen: 7 months 2 weeks ago
Joined: 2016-09-20 15:44
Well, it turns out this wasn

Well, it turns out this wasn't such a good idea.
But thanks to archive.org, I found a more recent file. (https://web.archive.org/web/20060717100409/http://meesoft.logicnet.dk/Sm...)
I'll try this one first and if it still won't work (something I doubt it will), I'll put up what I'm working on on my google drive...

François

Flaver-D
Offline
Last seen: 7 months 2 weeks ago
Joined: 2016-09-20 15:44
Well... that was a whole lot

Well... that was a whole lot of nothing.
So, here is the package I made https://drive.google.com/file/d/0B1dmZoIlURfDQlhzOTdBRFVVUGs/view?usp=sh...

What I proceeded to do was start the app, change the language to trigger the registry. The program then tells me that I have to restart the app for changes to apply, so I close the program. Then I check the Data\Settings folder for a reg file. The file never comes to the drive.
The language switch changes the HKEY_CURRENT_USER\SOFTWARE\MeeSoft\SmartMorph Language key to English or Dansk (it's actually the name of a file in the app folder).

I must definitely be doing something wrong...
My key is Fat32, I'm running the latest portableapps,

François

Ken Herbert
Ken Herbert's picture
Offline
Last seen: 3 hours 41 min ago
DeveloperModerator
Joined: 2010-05-25 18:19
Have you re-run the

Have you re-run the PortableApps.com Launcher after making the changes?

JLim
Offline
Last seen: 1 week 1 day ago
Joined: 2013-07-17 01:30
Very interesting.

Very interesting.
By eye I do not see any different.
Using a program to compare the text of the 2 files. It said the last line "1=HKCU\Software\MeeSoft" is different.
compare the binary. the 2 files are totally different.
The encoding of the files both are ANSI.

Base on experience and by guessing, I suggest to edit the launcher ini file using an English font like Times New Roman or Arial and in an English OS.

Just replace with my launcher ini file, no need to re-generate the launcher. It will work correctly.
https://www.upload.ee/files/6205587/SmartMorphPortable.7z.html

May be someone can explain what is actually happen.

Flaver-D
Offline
Last seen: 7 months 2 weeks ago
Joined: 2016-09-20 15:44
That's incredibly strange. I

That's incredibly strange. I just tried your file and it now works!
I use Notepad++ to write my stuff. I had encoding set to UTF8...
But to generate the initial file, I used a batch script that I wrote to set the basic structures... Could the launcher be incompatible with ini files generated at the windows command prompt?

François

JLim
Offline
Last seen: 1 week 1 day ago
Joined: 2013-07-17 01:30
encode in ANSI only

It has been discuss in this forums number of years ago, the launcher ini file should encode in ANSI only.
Otherwise some function may not work. My previous experience was the directries move function not work.

Flaver-D
Offline
Last seen: 7 months 2 weeks ago
Joined: 2016-09-20 15:44
In that case I'll have to be

In that case I'll have to be more careful with that.

Though I wonder why the builders of the Launcher maker didn't include some sort of script that would convert the ini files to the proper format?

François

Flaver-D
Offline
Last seen: 7 months 2 weeks ago
Joined: 2016-09-20 15:44
OK, this is getting weirder

OK, this is getting weirder by the minute.
I tried to make another launcher for the Windows MovieMaker 6 that I got from http://movies.blainesville.com/.
I put everything in the right spot, make sure the ini files are saved in ANSI (that's what notepad++ tells me).
But the launcher still doesn't seem to make the program run portably...

So now my big question tends to point to an OS based problem.
Right now I'm running Windows 10 Home 64 bit version 1607 build 14393.187
I have an English version of Windows but use a Canadian Multilingual keyboard (if that matters, but I don't think it should).

François

Flaver-D
Offline
Last seen: 7 months 2 weeks ago
Joined: 2016-09-20 15:44
YES!

YES!
I finally solved my mystery!
Thanks Smile

François

Log in or register to post comments