I've been working on a Winamp launcher to apply a reg key for the pro registration. I previously posted about this here (https://portableapps.com/node/12246), but decided to bring this up in this forum because it is more about development now. I've been using the PuttyPortable source and changing it so that I can use it with winamp. The only problem I have now it that the launcher will not use the registry entry in the \Data\settings folder. I've placed a reg entry in there containing the pro registration, but the launcher backs that reg up as a .reg.old file and creates a new blank one that it uses. This is the first time I've ever tried to do anything like this, so I have no idea how to fix this. What do I need to do? I appreciate any help.
Can you add your source code into your post here? please remember to enclose the source in <pre> </pre> tags so that it remains properly formatted and does not distort the web-page.
The developer formerly known as ZGitRDun8705
Yeah, here is the source. I know the problem occurs in the Registry Backup section, but I'm not really sure what everything does, so I don't know how to fix it.
Thanks for your help.
I can't tell from the quick look I just took, but the fact that the key is in HKLM may have something to do with it. I'll take a deeper look tonight, and I'm sure someone else will have a response by then too.
The developer formerly known as ZGitRDun8705
I guess what I don't understand is that it has no problem writing a key to the registry, it just doesn't use the key that is supplied. It backs it up and creates a new one.
Yeah...I couldn't tell from my quick look, I'll look later tonight again though. Hopefully we'll figure this out.
Though if HKLM is used, this won't really be portable anyway, because HKLM requires admin rights if i remember correctly
The developer formerly known as ZGitRDun8705
Yeah, I know about the admin rights. If that is the case, then you'll just have to run winamp without the pro registration, which isn't really a big deal. I am using a computer with admin rights, and the correct registry isn't placed in the registry. Thank you for looking at this, it'll be a huge help.
Did you or anybody else get a chance to look at this?
No i didn't get a chance to. sorry. i'll email myself now so i remember to look tonight lol.
The developer formerly known as ZGitRDun8705
Thanks, I know it's probably not that important, but I just want to get it done so I can finally start using winamp 'truly' portably.
I also have another question, hopefully this isn't too involved. I noticed that the in the firefox launcher you can change the name of the exe and the file name in the ini file and it will use that information to launch the program. What would I have to do to implement this in this launcher? Or is this something that is too hard? I just thought it would be a good idea and it's will also help me learn. Thanks
I'm really not trying to bump this thread, I've just been trying to figure this out, looking at the documentation on the website and looking through other installers and it's driving me nuts. Does anybody know how to fix this?
I haven't been able to figure it out, your code looks fine as far as i can tell.
The developer formerly known as ZGitRDun8705
The problem seems to be that the launcher never uses the reg file supplied. It always creates a new reg file with random data. The name of the reg entry is RandSeedFile. It should only create this when no entry is found in the \Data\settings folder. Something is messed up somewhere, I just can't find it. It also overwirtes the reg entry in the settings folder with the random data it created when the launcher closes. Hopefully somebody can figure this, preferably John since he's the one that wrote the launcher I adapted.
what are
these lines for?
The developer formerly known as ZGitRDun8705
I honestly don't know, I just modified John's launcher for PuttyPortable. Like I said before, I have very little knowledge of programming, I'm trying to figure things out as I go. I'll try removing them and see if that helps.
I don't have a copy of winamp pro available to test this with. Does winamp create entries is HKCU as well, or does it only use HKLM? If other keys are created in HKCU, you will need to add support for that in as well.
The developer formerly known as ZGitRDun8705
You first have to "portablize" winamp. Information on doing that can be found here (http://forums.winamp.com/showthread.php?threadid=279827). This just makes sure that nothing that requires the registry is installed and an ini file is used to save the settings. After doing that it seems that the pro registration is the only thing that is saved to the registry. I attached the regshot log showing what is created when the program is run.
So it looks like there are really only two entries.
Edit:
I also removed those lines you mentioned above, but there was no change. I really have no idea what they were for.
First, here -
Should be -
You need to create the path if it doesn't exist.
And second -
Should be -
You missed the $ before your variable. See if it works now...
Unfortunately that didn't fix anything. I just went ahead and took the 7-zip launcher and modified it. It works like a charm now. The registry entry is correctly handled, everything is cleaned up, and it even allows the user to change the name of the exe to run in the ini.
I also compiled the launcher into an installable exe and included instructions on portablizing the full version of winamp. If people want it I can send it to them the launcher.
Seeing as this was the first time I've ever tried to write a program, I'd like to thank you and Zach for being patient with me.
Thanks again.