Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7974823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:29:23+00:00 2026-06-04T08:29:23+00:00

I have a install4j project and want to make a project. There is a

  • 0

I have a install4j project and want to make a project.

There is a libs-folder within my setup, where all my jars are packaged:

<install-dir>/libs/myA.jar
<install-dir>/libs/myB.jar
<install-dir>/libs/alien.jar

The alien.jar is a additional file, not created from my setup.
if I deliver a update with a packages libs-folder the alien.jar get deleted and I don’t understand why.

There is a DeleteFilesAction before the InstallFilesAction, which has a filter that all alien.jar weon’t be deleted. If I make a MessageBox after my DeleteFilesAction, the

alien.jar

still exists.

When the InstallFileAction starts, the complete libs-Folder seems to be deleted.

I beleave there are configuration flags, which I don’t know.

Question:
How do I delete the complete libs-folder, expect the alien.jar?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T08:29:26+00:00Added an answer on June 4, 2026 at 8:29 am

    I think it is not possible with an DeleteFilesAndDirectory-Action to delete all (unknown) files within a directory.

    I used a Action where <install-dir>/libs is provided as folder to be deleted.
    I provided a filter-Script for filenames (the alien.jar had a return value “false” the rest shozuld be deleted). But the action deletes the libs-dir as well. I think it works as designed, so it is not a bug.

    For all peope with the same Problem a workarround or soultion:

    com.install4j.runtime.installer.helper.fileinst.FileInstaller fi = com.install4j.runtime.installer.helper.fileinst.FileInstaller.getInstance();
    
    File directory = new File(context.getInstallationDirectory(), "/libs");
    
    File[] filesInLib = directory.listFiles();
    
    for(File file:filesInLib){
       boolean shouldDelete= true;
    
       if(file.getName().toLowerCase().contains("alien")){
           Util.logInfo(null,"dexchange detected: " + file.getName());
           shouldDelete= false;
       }
    
       Util.logInfo(null,"Delete " + file.getAbsolutePath() + ": " +reval);
    
       if(shouldDelete){
          if (file.exists()) {
              Util.logInfo( null, "delete file: " + file);
              fi.deleteFile(file);
          }
       }
    }
    
    return false;
    

    At Ingo Kegel:
    Thanks for your help, I didn’t want to open a support ticket, because I was quite sure it is no bug in you product. But I think another checkbox “delete if not empty” would help a lot in the DeleteFilesOrDirectory Action.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Setup project (MSI) in VS2008 which installs my project. Within the
What I want is to only have one setup project in my solution, and
I have a windows installer (MSI) project. I want to ensure that when i
I have a WiX install project that includes IIS setings for virtual directory and
I have a setup project that installs my app to the typical program files
I have an Setup project that installs App.exe. App.exe depends on 1) A third
I am new to .net and have this problem: I want to make installer
I have a setup project in which I have a custom action that is
Is it possible to make a setup and deployment project in VB.net 2008, every
I'm working on an android project, and I have to install it many times

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.