PDA

View Full Version : Suggestion: Log script action for uninstall


SetupJuggler
09-04-2009, 08:42 AM
Hi,
using SF 8.1.1008.0

My suggestion for a new Setup Factory feature:
Log all the things done by LUA scripts for uninstall, if logging is switched ON by a new script function. The default for logging might be off, the today value. So I don#t have to be concerned about how to get all the stuff deleted by uninstall.


-- Descriction enable/disable logging for uninstall
-- returns the previous logging state
-- boolean UninstallData.EnableLog(boolean Enable = true)

-- returns the current state for logging
-- boolean UninstallData.GetLogState()

--Sample:

oldLogState = UninstallData.EnableLog();

-- will be uninstalled
Shell.CreateShortCut(Folder, Description, Target);
Folder.Create(Folder);
Registry.Createkey(MainKey, Subkey);

oldLogState = UninstallData.EnableLog(oldLogState);

-- will not be uninstalled
Shell.CreateShortCut(FolderSystem, DescriptionSystem, TargetSystem);



Regards,
Udo

Darryl
09-22-2009, 11:25 AM
I'm having difficulty understanding your suggestion for this one and what you're trying to accomplish with the feature.

If possible, could you explain further what you mean and the how you would intend to use the described feature?

Thanks.

SetupJuggler
09-24-2009, 08:54 AM
Hi Darryl,

within script I always have to concern about cleaning up what I have done.
For example, if I use Shell.CreateShortCut(Folder, Description, Target) within install script, I manually have to delete this shortcut on uninstall. For my understanding, all what is done within an installer, script or GUI, has to be removed on uninstall, except I mark this for leave it on the system. This was the default behaviour of our previous used installer.

To not concern about uninstalling what Shell.CreateShortCut installs, I made a script wrapper for this function, that includes an automatic uninstall.

Hope this helps to understand my suggestion.

Udo