Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Remove file


3 replies to this topic

Christoph

Christoph
  • Full Members
  • 81 posts

Posted 14 November 2007 - 12:14

The installer I've created installs a Windows NT Service.
This WindowsNT Service creates a logfile within a folderstructure that I also create during installation. This logfile is kept in use as long as the service is running.

I've created a custom action to remove this folderstructure during REMOVE="ALL" mode as extra files and folders are created there during program execution.

My question: the WindowsNT Service is removed automatically during uninstall but when? With other words, where do I need to schedule my cleanup Custom Action within the sequence and which type of execution do I need to use(immediate, commit, deferred?).

I've tried to schedule the cleanup Custom Action after removefolders within the execute sequence and use immediate execution but at that moment, the service still seems to exist, so keeping some logfiles in use....

saybo

saybo
  • Full Members
  • 11 posts

Posted 14 November 2007 - 18:17

try switching to deferred execution, then it will happen later.

Christoph

Christoph
  • Full Members
  • 81 posts

Posted 15 November 2007 - 09:51

Hi,

thx... this works... what the sequence of the code execution is concerned.

Within this installscript I want to do this:

The installscript CA needs only to be executed during full uninstall(REMOVE~="ALL"). I read out a property("K_SUM_DATA"). This property contains a folderpath that is stored within the registry. So I have defined a systemsearch to fill this property with the folderpath value. However, when I want to read out the value to use in my CA, the property can not be read out, it seems to be empty.

I suppose that the systemsearch is executed during a full uninstall so that the property K_SUM_DATA is filled correctly but I can probably not access the value of the property anymore within a deferred CA in the execute sequence. Correct?

Do you know another way to get this working?

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 15 November 2007 - 20:33

In order to use properties in deferred custom actions you need to use "CustomActionData". It's a bit confusing, but described exactly in the docs.
But why are you using a custom action in the first place? You could instead add a row to the RemoveFile table.