|
#1
|
|||
|
|||
|
Deleting the Uninstaller
I'm fond of housekeeping, but only INSIDE the computer (ask my wife).
When the end user wants to uninstall my app (I have some 'dumb' customers), I want to clean up his computer. By default SUF70 saves uninstall.exe (450,000 bytes) in C:\WINDOWS\ProductName. You will notice: After building 10 projects you have 10 occurrences of uninstall.exe (=4,500,000 bytes). After uninstalling your app, the subfolder with content still is on the disk. In addition you eventually have two log files; by default: %WindowsFolder%\%ProductName% Setup Log.txt %WindowsFolder%\%ProductName% Uninstall Log.txt Personally I don't like to have a lot of files in Windows root directory; I want to put them into subfolders. In SUF70 I always replace the space in the log file names with a backslash. Then I have all three files in the Product Folder under Windows. Space available isn't the main problem these days. Still I want to 'clean up' when the end user uninstalls my app (can you understand why?). I have now created a global function to perform this task. Just add gu_DeleteUninstaller() to Uninstall Action.On Shutdown. If you want to delete the log files, you have to add another line: gu_DeleteLogFiles(). All the files are deleted on reboot. (Both 'default location' and 'preferred location' is covered by the function.) Why create an Uninstall Log and immediately delete it in the same operation? Well, if an error occurs during the uninstall process, the log files can be copied to another location (before reboot). (You can add a message to tell the user to do so.) I you want to try my functions, save the attached file to the ..\Includes\Scripts folder with .lua extension. You have to add three lines in Actions.On Shutdown. You'll find all instructions as comments in the lua file. Feel free to comment and suggest improvements! Do you think I'm crazy with my housekeeping? Please tell me. |
|
#2
|
|||
|
|||
|
Try using a wininit.ini file. it's preatty simple
|
|
#3
|
|||
|
|||
|
Quote:
Preferably with an example; the forum users would than have another option to use. |
|
#4
|
|||
|
|||
|
Quote:
|
|
#5
|
||||
|
||||
|
I think he is referring to the fact that Windows 9x systems use that INI file as a way to delete files on reboot. In our products, use File.DeleteOnReboot to do the same thing and it works on all Windows OSs.
|
|
#6
|
|||
|
|||
|
Quote:
I confess; I'm a teaser now, but when Josué steps in and tells "there is en easier way", I think he should tell the forum users HOW. (The challenge in this case is not the delete command, but how to identify the files to be deleted (in a generic function)). I ran into some "problems" (from my commented source): -- We can not use UninstallData.GetItem() as an Uninstall action; it will give Error 2864 "Action not available during uninstall." -- We need the value at Uninstall, we obtain it now (at Setup), creates a Session Variable. That Session Variable we can get when uninstalling. Q: Is this the correct way to do it? BTW, I tried the winiit.ini option (on XP), but I couldn't have it to work. |
|
#7
|
|||
|
|||
|
Sorry, the previously posted lua file is missing closing comment brackets after the description of function #2. This is corrected in the enclosed file and I have added deletion of the "Uninstall files folder".
Save the .txt file with .lua extension. |
|
#8
|
|||
|
|||
|
The amendment (10/22/04)"Delete Uninstall files folder" should NOT be necessary. According to the uninstall log the last actions (AFTER On Shutdown) are:
Remove uninstall support files Remove folder: %AppFolder%\Uninstall The last lines in function gu_DeleteUninstaller() may be removed. (The reason why the folder wasn't removed the other day, probably was that the folder was opened in a file manager.) |
|
#9
|
|||
|
|||
|
I should like to warn you if you want to use the uploaded script (post#7). Please read the reflections in http://www.indigorose.com/forums/showthread.php?t=11634 (post#3).
SUF70 isn't capable of reading the specific REG_MULTI_SZ registry entry (due to OS restrictions I suppose). The Delete Uninstall Files can be performed in a proper way by using a "flag file". |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| project size same after deleting startup video? | rdf | AutoPlay Media Studio 5.0 | 2 | 10-12-2004 10:44 PM |
| Custom Icon for Control Panel Uninstaller? | eric_darling | Setup Factory 6.0 | 4 | 09-20-2004 10:58 AM |
| Conditional Uninstaller? | Goldenhawk | Setup Factory 6.0 | 3 | 05-11-2004 12:13 AM |
| Uninstaller keeps crashing | Marker0077 | Setup Factory 6.0 | 11 | 05-28-2003 10:14 AM |
| Uninstaller problem | ETREE | Setup Factory 6.0 | 1 | 12-10-2002 02:37 PM |
All times are GMT -6. The time now is 03:31 AM.








Linear Mode

