DeleteDir always returns -1
Posted 01 May 2001 - 17:19
I would like to be able to delete this directory. Nothing is marked read-only, and I am not specifying the ROOT. If I have 2 directories, I can not delete these two directories.
Posted 02 May 2001 - 09:56
2 - When DeleteDir returns -1, is it possible to remove the directory manually at that time (so before continuing with the installation) ?.
Posted 02 May 2001 - 15:52
2) While in my loop, when I find a directory to copy and delete, at that time I cannot delete it using DeleteDir with ALLCONTENTS. Explorer will not delete it either. When I advance and find the next directory to copy, I can manually delete the first directory with Explorer. I can not delete the last directory until InstallShield terminates. What is holding these files open? Why was I able to manually delete one and not the other?
I am going to have to remove the directories later somehow but I have already deleted all of the files in them so I can't identify them later.
Posted 02 May 2001 - 16:55
Try ChangeDirectory(SRCDIR) before DeleteDir.
Posted 02 May 2001 - 23:09
Posted 03 May 2001 - 08:35
Is there perhaps a program in the directory which is running when you try to delete the directory ?
Are you trying to delete directories which are used by IS at runtime ?
Posted 03 May 2001 - 15:57
We are changing our directory structure to one that is one level deeper. We used to have our directories right off of the root. We are going to a new 32 bit program and are putting the same directories under a new folder \rlisys. (for ex: \df becomes \rlisys\df).
I can get rid of all other directories except the ones I am using XCopyFile and the loop that uses the list of directories that I interogate, looking for specific directories (i.e. specific files exist in).
I have created a program that will delete these directories and tried running in later in the script and I still cannot delete the last directory in the list.
I am using FindAllDirs and suspect this is locking access to the directories. I am not using FindAllFiles.
Posted 03 May 2001 - 16:15
|I am using FindAllDirs and suspect this is locking access to the directories. I am not using FindAllFiles|
FindAllFiles(svDir, "*.*", svDummyFile, CANCEL) to make sure all files in the directory are unlocked. Otherwise I'm kind of running out of options here. If this doesn't work, send me the your script-code, and I'll see if I can reproduce your problem on my machine. Perhaps that will clarify what's happening ...
Posted 03 May 2001 - 22:15
I can not find any reference to this specific command using CANCEL : FindAllFiles(svDir, "*.*", vDummyFile, CANCEL). Where is this documented?
I used it by putting the actual directory into svDir, and never set svDummyFile to anything.
Now and can return to coding and stop trying to program around a problem. Thanks!
Posted 04 May 2001 - 09:17
Bit of bad move on the part of InstallShield not to document this. But then again, it is where this messageboard comes in handy ;-)
'bout the svDummyFile parameter in FindAllFiles : Normally it is the parameter in which the first found file is returned, but it has no meaning when you specify CANCEL as action.
Glad I could help, Ide
Posted 09 August 2010 - 16:02
i am unable to remove the directory having contents with
DeleteDir("c:\\progrm files\\ ....\\xyz",ALLCONTENTS);
it is alway returning -1, here the OS is Windows VISTA, and the files are in ReadOnly mode
is anyone know the way how to delete files/directory in this case.
Posted 10 August 2010 - 14:22
Posted 10 August 2010 - 15:16
|QUOTE (Taco Bell @ 2010-08-10 14:22)|
|Vijay123, have you tried deleting those same files from Explorer while your InstallShield setup is running and again after IS has exited? Also, what if the files are no longer read only?|
hi Bell, thanks for your time on this
i am trying this removal of files in the process of uninstalling the Appliaction. when i tried to delete this foder in explorer manually First i am getting "Access Denied" do you want to continue,
when i procced with 'Yes' then it is removing files.
For Radonly Attribute of files:
these are html files it's basic purpose to provide help, and around 60 MB of size
they are basically in readonly attributes
And my attempt to remove the Readonly attribute is also failing with "Access Denied" error.
Posted 11 August 2010 - 14:23