Parallax software in "portable" versions
RDL2004
Posts: 2,554
I tried running both the Propeller Tool and SimpleIDE from a flash drive (copied from an installation on a different computer). It seems to work okay, however in both cases Registry keys are created under Windows 7. This happens automatically without the UAC being invoked (no user permission needed). I assume this is done by some kind of system API call or something similar that is initiated by the program when it is first run, but maybe Windows does it. I don't know, does anyone else have any idea?
Personally, I'm of the opinion that the Windows Registry ranks very high on the list of things that "seemed like a good idea at the time..." and should be used only by Windows itself. Many, many programs these days can run in "portable mode" (nothing written to the Windows Registry) this provides a number of useful benefits.
There is nothing special in these Registry keys, just basic program settings which could easily be stored in config file in the program folder instead of the Registry. Is there anyway this could be changed? Maybe in a separate "Lite" version?
Personally, I'm of the opinion that the Windows Registry ranks very high on the list of things that "seemed like a good idea at the time..." and should be used only by Windows itself. Many, many programs these days can run in "portable mode" (nothing written to the Windows Registry) this provides a number of useful benefits.
There is nothing special in these Registry keys, just basic program settings which could easily be stored in config file in the program folder instead of the Registry. Is there anyway this could be changed? Maybe in a separate "Lite" version?
Comments
Path variables can be set manually, this doesn't prevent all the more trivial and mundane settings from being stored in a separate config file instead of cluttering up the Registry, which is the real point here.
My experience is that even after being "uninstalled" most software leaves behind many useless entries in the Registry. Given enough time this leads to Registry bloat and slowing down of a Windows system. This is probably not the intention of the developers, it may be a defect in the Windows or third party install/uninstaller process.
Yesterday, after manually deleting all the ParallaxInc entries from my experiments in "portable mode", I installed the Propeller Tool using the normal procedure. I ran the tool one time and then uninstalled it via the Control Panel. Here's what I found:
This particular system is my old Core2Duo machine which bit the dust last fall and I am in the process of resurrecting it for use as a "work" computer. I've reinstalled Windows 7 on it four times in the last couple of weeks trying to fix some minor issues* and in the process I've messed around a lot with Services and such, so there's a remote possibility I may have done something which caused this. I did another Windows install last night and I now have a solid restore point with all the default settings, so I will try this again to see if I get the same results. I need to do a full system backup first.
* Does anybody know why a PCI wireless Ethernet card would cause the HDD light to flicker?
This is true. Command-line Propeller-GCC has a batch file that sets the path before opening the big black command window which provides a proper environment context.
If I could set the environment variable for multiple programs from within SimpleIDE, a "portable" version might be possible (with a .ini file).
The priority of such an enhancement needs to be determined.
There's a reason why programs aren't supposed to use a .ini file in the program directory;
The program runs with the user's right, and he shouldn't need to have write access to that folder!
In fact, the user shouldn't have write access to ANY folder with executable files.
This is for security reasons... Without write access, trojans and other cr*p that the user accidentally starts won't have write access to other files, so it can't 'burrow' into other files.
Any program can by default add or edit keys in the Current_user part of Registry, but not in the 'Global' areas, to stop cr@p from installing itself as a service or to run in the background.
(Most browser hijackers for example can be removed by restarting the PC, logging in as an admin user and removing the offending file from the 'Run' node in the user's part of the Registry)
What a load of twonk.
When I write a program on a computer I expect to be able to compile and execute it. It's somewhere in my home space and it's executable and I have to write to it and execute it. I'll also need any config and data files it needs in my home space. It's impossible work otherwise.
Same if I down load source for, say, SimpleIDE to compile and check out. Same if I download a pre-compiled binary of SimpleIDE. There is no need to make any OS global changes, like registry entries, to do any of that.
Now perhaps that binary is a trojan. Oh well it can now trash my home space. Easily fixable. It cannot install itself a permanent feature of my OS running in the background or such.
-Phil
Of course anything that needs persistent settings must use some kind of storage.
I don't think Program Files (X86) has the write restrictions because that's where Steam installs and it saves all kinds of stuff there. I also have a game that's in its own folder directly under C:/ and it has no trouble saving games there. Which makes you wonder what the point is after all.
Using an Ethernet cable doesn't cause the HDD light to flicker. I tried 3 different PCI wireless cards and they all did it. I'm going to try a USB wireless adapter next.
Next I installed the Propeller Tool, everything except the FTDI driver and no file associations. I dumped the Registry to a text file again (without actually running the Propeller Tool) and the results of the count were:
Parallax =161
ParallaxInc = 0
Hmm...
Started and shutdown the Propeller Tool one time and repeated the Registry dump and count. Results this time were:
Parallax = 167
ParallaxInc = 3
As best as I can figure out all, or nearly all, of the Parallax entries are from the install tool. Keeping track of what was written to the hard drive I guess, so it would know what to remove if the Propeller Tool was uninstalled. The actual keys used by the Propeller Tool are the ParallaxInc keys. They show up in three places and there's almost 100 sub-keys. As far as I could see they're just simple basic settings.
After getting that information, I uninstalled the Propeller Tool, restarted the computer and did the dump and count again. This time the results were:
Parallax = 8
ParallaxInc = 3
Okay...
I checked and yep, all the ParallaxInc sections along with all the sub-keys are still there. I wonder why they don't get removed when the application is uninstalled?
I didn't bother to look and see where the 8 remaining Parallax entries were, but I think know what they were because - the Parallax entry on the Start menu was still there and the Parallax folder in "Program Files" was still there. There were no files inside, but the main folder and all sub-folder were still present.
Why did the uninstall not remove them I wonder.
I ran the System Restore and put things back the way they were yesterday.
At this point, my conclusions are that the uninstall process didn't do anything that I couldn't do better by just hitting the delete key. And I can do that without writing and then removing over 150 entries in the Registry.
I know if I just put a copy of the Parallax folder on the computer and run the Tool without bothering to install it, it will automatically make the ParallaxInc entries in the Registry (and only those) and hopefully that's all it needs to work.
That will be my next experiment.
It's just that it makes it a much cleaner setup. Yuo can set file permission on an entire folder just as easy as on a single file. And if all files that may be changed are in a single folder...
Most people, if they get a file permission error(and know how to set permissions) will just open the entire folder for 'full access' no matter what files are in it.
Not exactly an Einstein moment if that is the folder with the main executable.
I installed the FTDI drivers, then I copied the Parallax Inc folders into "Program Files" (had to be done as administrator), and it looks like it's running just fine without ever being "installed". If the Prop Tool could be modified to not save its settings in the Registry and just use a local xml file or something, it should be possible to run it from a flash drive just about anywhere. Of course you wouldn't be able to actually program a Propeller unless the computer you were using already had the FTDI drivers installed.
One thing I noticed is that some of the Registry keys specify a full path to certain locations and I'm wondering what would happen to those if I had put the Parallax Inc folders somewhere else besides in "Program Files".
For example: