Windows error 32

Richard Gaskin ambassador at fourthworld.com
Wed Jan 5 12:08:47 EST 2011


Bob Sneidar wrote:

 > Is the uninstaller app in the application folder? If so, then that
 > is your problem. That is probably why there is an add/remove programs
 > feature in Windows. Apps cannot delete themselves, although they
 > should be able to move themselves to the trash, and then delete the
 > folder they were launched from. I could be wrong on that point tho'.

Indeed they should, and as I noted below that's what I tried, copying 
the installer to tmp and then launching that copy.  I'd earlier been 
using Wise Install for this sort of thing, and their installer does the 
same.

What made it initially mystifying is that I was able to delete every 
file in that folder, even the original copy of the uninstaller, just not 
the folder itself.

I posted the fix the following day:  turns out you need to also change 
the working directory away from the one being deleted, a simple 
one-liner in LC:
<http://lists.runrev.com/pipermail/use-livecode/2010-December/150273.html>

I've considered using the Control Panel, but while we can provide 
notification to that tool we still need to feed it the particulars of 
the uninstall, an additional step it seems only a minority of apps 
installed on my Win machines have bothered to do.

Most of the reviewers for my products do indeed note whether the app has 
an uninstaller, and mark their rating down if not, but it seems they're 
agnostic over whether the uninstall is done by the Control Panel or by 
the app's own tools.

Personally, I prefer to deliver the uninstall in the same section of the 
Start menu with everything else related to my apps so it's all in one 
place, though I may consider doing the extra step of feeding the Control 
Panel as an additional convenience in future versions.

--
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  LiveCode Journal blog: http://LiveCodejournal.com/blog.irv


 >
 > On Dec 17, 2010, at 6:08 PM, Richard Gaskin wrote:
 >
 >> I'm making an uninstaller for one of my apps on Windows, and
 >> everything's working swell except for one detail:
 >>
 >> I can delete all files and folders related to the install with ease,
 >> but when I try to delete the application folder sysError returns 32,
 >> which means it's in use by another process.
 >>
 >> Here's the setup:
 >>
 >> The uninstaller works as we're required to do on Windows: when
 >> launched it makes a copy of itself into the temp folder, and
 >> launches that copy after which the original quits.  We have to do
 >> that because of course an app can't delete itself.  The copy has
 >> the UI that the user clicks to start the uninstall.
 >>
 >> That copy in temp works great, and clears out everything, even the
 >> original uninstaller that launched it.
 >>
 >> The one thing it can't do is delete the folder the app was
 >> originally in, which is in the Program Files directory, e.g.:
 >>
 >>  C:\Program Files\MyApp\
 >>
 >> It seems weird to me that I can so easily delete all the contents of
 >> that folder, even all the nested subfolders that were in it, yet not
 >> the folder itself.
 >>
 >> And yes, I've checked: the folder is indeed empty.
 >>
 >> Even weirder, I can open LC afterward and run this in the Message
 >> Box:
 >>
 >>   delete folder "C:/Program Files/MyApp/"
 >>
 >> ...and it deletes as expected without complaint.
 >>
 >> My first hunch was that since the original uninstaller app is
 >> launching the one doing the deleting, maybe I could add another
 >> layer of misdirection by having a copy of that app make another
 >> app in temp just to delete the damn folder.  No go, same error 32.
 >>
 >> Any of you come across something like this before?  How did you get
 >> around it?
 >>
 >> --
 >> Richard Gaskin
 >> Fourth World Media Corporation
 >> ___________________________________________________________
 >> Ambassador at FourthWorld.com       http://www.FourthWorld.com







More information about the use-livecode mailing list