Announcement

Collapse
No announcement yet.

Setup Factory installer leaves behind folder which cannot be deleted...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Setup Factory installer leaves behind folder which cannot be deleted...

    I have a working installer created with Setup Factory.

    After EVERY run (which I'm doing a lot of during testing), the setup completes, but always leaves a folder behind in:

    C:\Users\<MyUserID>\AppData\Local\Temp

    The folder name left behind will be

    _ir_sf_temp_<incrementing counter>

    The only file left in the folder is a TFT file, which seems to be the font which is used for the background window (I know this as I have changed fonts there, and it changes the file left behind).

    I cannot delete this file manually from Windows Explorer.

    Can anyone shed any light on why this is happening, and how to get around it?

    Thank you in advance...

    Cheers
    Robert

  • #2
    This looks like a bug to me, and I could replicate the issue. I'll file a report for this, so the developers can look into the problem during the next update cycle.

    In the meanwhile, you could add this code to the beginning of your On Shutdown event script:

    Code:
    [COLOR="#0000FF"]local[/COLOR] nUnique [COLOR="#FF0000"]=[/COLOR] [COLOR="#0000FF"]string.format[/COLOR]([COLOR="#800080"]"%X"[/COLOR][COLOR="#FF0000"],[/COLOR] [COLOR="#0000FF"]os.time[/COLOR]())[COLOR="#FF0000"];[/COLOR]
    [COLOR="#0000FF"]local[/COLOR] sCommand [COLOR="#FF0000"]=[/COLOR] SessionVar[COLOR="#FF0000"].[/COLOR]Expand([COLOR="#800080"]"[COLOR="#800080"]\"[/COLOR]%SystemFolder%[COLOR="#800080"]\\[/COLOR]cmd.exe[COLOR="#800080"]\"[/COLOR] /C rmdir /Q /S [COLOR="#800080"]\"[/COLOR]%TempLaunchFolder%[COLOR="#800080"]\"[/COLOR]"[/COLOR])[COLOR="#FF0000"];[/COLOR]
    Registry[COLOR="#FF0000"].[/COLOR]SetValue(HKEY_LOCAL_MACHINE[COLOR="#FF0000"],[/COLOR] [COLOR="#800080"]"SOFTWARE[COLOR="#800080"]\\[/COLOR]Microsoft[COLOR="#800080"]\\[/COLOR]Windows[COLOR="#800080"]\\[/COLOR]CurrentVersion[COLOR="#800080"]\\[/COLOR]RunOnce"[/COLOR][COLOR="#FF0000"],[/COLOR] [COLOR="#800080"]"SF9Cleanup_"[/COLOR] [COLOR="#FF0000"]..[/COLOR] nUnique[COLOR="#FF0000"],[/COLOR] sCommand[COLOR="#FF0000"],[/COLOR] REG_SZ)[COLOR="#FF0000"];[/COLOR]
    This will create a new entry in the registry each time the setup is run, and the newly created temporary folder is removed on the next reboot. If you run the setup twice, you will have two temporary folders, and both should be removed during the next reboot. Folders created previously are not removed with this code.

    Ulrich

    Comment


    • #3
      Thank you, Ulrich...

      Sorry for slow reply, been away on holidays...

      Comment

      Working...
      X