Anti-Delete

Started by
19 comments, last by Programmer One 22 years ago
I have met some people who *uninstall* programs by deleting the folder itself. Is there a way to disable this...? I am writing a program were if the something is not properly uninstalled, it would cause problems for the computer. Is there a way to stop people rummaging through your folder and doing as they please - which in effect will end up skrewing up their computer. _____________________________________________________ ICQ #: 149510932 Google - OpenGL - DirectX - Windows Guide Network - MSDN - Symantec Virus Info "Imagination is more important than knowledge." - Albert Einstein
Advertisement
There''s nothing you can do about it. Setting everything to read-only will help a bit, but nothing will stop them entirely. Anyway, when people are that stupid, I consider any problems they get to be their own. Put a warning in your installer, which should deter most people from trying.

Kippesoep
Sounds a bit suspicous...
But anyway why dont you just put everything into a resource then they could not do anything to it. Or you could create another .exe hide it somewhere eg system folder then create a registry key then on start up have it run the file and if it does not detect the folder then it would just re-copy everything to that folder... most people would be to dumb to figure out what was going on!!!
[email=esheppard@gmail.com]esheppard@gmail.com[/email]
And you''d seriously piss off the advanced users in some cases (for instance: if they move the directory some place else). I hate Micro$oft for forcing that bl**dy Internet Connection Wizard in my otherwise neatly categorised Program Files directory. (Stupid "System Restore". Took ages to disable that)

Kippesoep
sounds like you dont know how to code your software then. basically if the app requires that it is uninstalled via an uninstaller or things will get screwed up, you seriously need to rethink what you are doing. there should be NO game or app that requires an installation program. the only expceptions really are patches to the OS, os tweak tools, dx filters, ms software (since it tends to upgrade the os, heh), etc. i cant see how deleting files in the apps folder woudl cause problems for th pc. please explain. personally i will not install most software that i cant install via a simple unzip of the archive and uninstall through deletion of the folder. then again i used to use dos, and enjoyed being able to delete apps without worrying that they left garbage behind because of shoddy programming.
And you, elis-cool, are too dumb to know the difference between "to" and "too".
quote:Original post by a person
sounds like you dont know how to code your software then.


Please lose the elitist attitude

Almost every commercial application/game uses an installer and unistaller program. Setting are almost always stored in the registry. Which is why just deleting the folder is not enough.

There are pros and cons for this method. Your entitled to your own personal opinion over which you like better. Calm down.
I''m assuming we''re talking about Windows here...

If you follow the conventions for a Windows application, then you use the Registry for settings. So, an uninstaller would be required to remove the created Registry entries since just deleting the application''s directory wouldn''t accomplish that.

Even on other platforms there''s usually some suggested place to store settings that isn''t the application''s directory. Again, an uninstaller solves the problem of residual nonsense.

In a perfect world or platform, the application folder would completely represent the application. Deleting it would delete whatever is attached to the application. Bundles on Mac OS X are pretty close, but not 100% there.
maybe you missed my point.
the reason i call it shoddy programming, is because he said just deleting the apps folder would screw up the computer. that is VERY shoddy programming, especially for a game.

i merely think that ppl abuse the registry for saving things. especially in smaller freeware/shareware apps. setting should be stored in local directories to the game. this is especially important for games like quake which can be difficult to configure without using a text editor on the cfg file (ie for setting up bindings, aliases and special video settings that dont normally appear in the options). ever since some commercial apps had broken uninstallers which deleted the ENTIRE directory below the installed directory. i have been wary of uninstallers. also some installers tend to overwrite newer versions of files. while winme+ handles this better (system files are not protected to a degree) it still is a problem. there is no real convention ot use the registry to store stuff, its just something ms thought would be nice. just like storing all your setting in an ini file in the windows or windows/system directory.

i do realize that many commercial apps use installers and uninstallers. most of those apps are also large and offer different installations based on how much will be put on the harddrive (while the other stuff is left on the cd). now it may sound silly, but to me smaller apps should not need installers. they ussually dont have different install options and have no need for global system configurations (ie part of a suite which needs to use a single config repository).

your right. heck linux has MANY suggested places to store stuff. so many standards its tough to pick just one

        // ANTI-MORON PROGRAM DELETION PREVENTOR V.1.0// Copyright Alex MW (aka Sandman) 2002// Run at startup (call from HKLM/SOFTWARE/Microsoft/Windows/CurrentVersion/Run)#include <stdio.h>INT APIENTRY WinMain(HINSTANCE,HINSTANCE,LPCSTR,int){  FILE* protectedFiles = fopen("MyExe.Exe","r");  while(protectedFiles);  return 0;}        


It's pretty stupid, but it works. You'll probably want to add a nice message handler to it as well, so that your uninstaller can ask it nicely to shut itself down.


[edited by - Sandman on March 19, 2002 6:46:10 AM]

This topic is closed to new replies.

Advertisement