Menu

#480 RMDir can't delete read-only folders

2.0 Series
closed-fixed
Scripting (211)
7
2006-05-19
2006-05-04
Anonymous
No

Hello,
My name's Dominique SANTINI, I'm French so i
appologize for my English.
My society used NSIS for now 3 years for building
Setups of our Web Application.
Since we delivred a new version we must create a temp
directory under Tomcat path, kill the current
directory of the old version and rename the temp
directory.
We didn't have any problem under NSIS 2.09 with the
RMDIR /R command. We decide to go under 2.14 and then
the problems began.
I already try the solution of kichik (change the
outpath to $TEMP) but noway.
I must tell that wy our computers we never have the
problem but our customers have it nearly always. The
problem is mostly for those who have W2000 SP4 (with
or without Windows Update). Less for those who have
W2003 (with or without Windows Update).
The directory that is not delete is always the same.
Our tree begin at IKOSXXX that will be deleted and the
temp directory renamed
HDD:\Logiciel\Sopra\Tomcat\4_1_30\webapps\IKOSXXX\WEB-
INF\classes\immobilier\sopra
The temp directory
HDD:\Logiciel\Sopra\Tomcat\4_1_30\webapps\_install
Another RMDIR /R is done to clear the compiled JSP in
HDD:\Logiciel\Sopra\Tomcat\4_1_30
\work\Standalone\localhost\IKOSXXX and it always work
perfectly
I give you our Setup who name's Setup.nsi
I hope you can do something for us
Thank you
email : dsantini@sopragroup.com

Discussion

  • Nobody/Anonymous

    The entire setup

     
  • Amir Szekely

    Amir Szekely - 2006-05-04
    • priority: 5 --> 2
     
  • Amir Szekely

    Amir Szekely - 2006-05-04

    Logged In: YES
    user_id=584402

    That script is huge, I can't tell what's wrong. It deletes a
    directory called _install in two places, none of them uses
    SetOutPath before RMDir, and one of them even creates the
    directory immediately after deleteing it.

    You have two options to find out what's wrong:

    1. Create a minimal script that reproduces the problem. If
    you can't see what's wrong from that script, make sure
    anyone can compile it and attach it for a review.

    2. Check out which files are left over when the directory is
    not deleted. Maybe the script or a plug-in, such as the xml
    plug-in, has a file left open. If only the directory is
    left, some application has it as the working directory. An
    application like Sysinternal's Process Explorer can show you
    which one.

     
  • Amir Szekely

    Amir Szekely - 2006-05-04
    • assigned_to: nobody --> kichik
    • status: open --> pending
     
  • Dominique_From_France

    Logged In: YES
    user_id=1516374

    Thank you for your answer. I think we've find something.
    The last directory of that path is positionned at "read
    only" attribute (HDD:\Logiciel\Sopra\Tomcat\4_1_30
    \webapps\IKOSXXX\WEB-
    INF\classes\immobilier\sopra). When I catch this attribute
    every thing is alright.
    We have just to find why the "read only" attribute is there.
    It may be an idea to put a parameter on RMDIR command for
    that the delete can be done even if there's some read only
    files or directories.
    Thank you again.

     
  • Amir Szekely

    Amir Szekely - 2006-05-19
    • priority: 2 --> 7
    • summary: RMDIR /R problem --> RMDir can't delete read-only folders
    • status: pending --> closed-fixed
     
  • Amir Szekely

    Amir Szekely - 2006-05-19

    Logged In: YES
    user_id=584402

    Read-only wasn't being removed from folders. It has been
    fixed, thanks.

     

Log in to post a comment.