RE: Location of Windows uninstaller?


Subject: RE: Location of Windows uninstaller?
From: Jesper (gakko@sleepy.dk)
Date: Mon Feb 26 2001 - 19:06:59 CST


How to have an EXE file delete itself

Windows 9x/Me
=============
Create a WININIT.INI file in the Windows folder. Create a [rename] section
and put in entries like "NewName.txt=OldName.txt" to have files renamed, or
"nul=OldName.txt" to have them deleted. Windows will perform this at
the next boot.
i.e.

[rename]
"nul=c:\progra~1\AbiSuite\AbiWord\askrm.exe"
"nul=c:\progra~1\AbiSuite\AbiWord\"

NB: notice the use of the short version of the path names

Windows NT/2000
===============
The MoveFileEx function has a parameter that allows
you to defer the move (or delete) until the next boot. It stores the
list of files to be processed in the registry.

BOOL MoveFileEx(
  LPCTSTR lpExistingFileName, // file name
  LPCTSTR lpNewFileName, // new file name
  DWORD dwFlags // move options
);

i.e.

MoveFileEx("c:\program
files1\AbiSuite\AbiWord\askrm.exe",NULL,MOVEFILE_DELAY_UNTIL_REBOOT);
MoveFileEx("c:\program
files\AbiSuite\AbiWord\",NULL,MOVEFILE_DELAY_UNTIL_REBOOT);

Jesper Larsen

> -----Original Message-----
> From: owner-abiword-dev@abisource.com
> [mailto:owner-abiword-dev@abisource.com]On Behalf Of Mike Nordell
> Sent: 26. februar 2001 09:06
> To: AbiWord-dev
> Subject: Re: Location of Windows uninstaller?
>
>
> Tom Briggs wrote:
> > By moving the uninstaller to the AbiWord program
> > directory, however, the uninstaller can no longer remove the
> installation
> > directory because the uninstaller is still there and still running.
>
> I prefer to see the installer in the AbiWord program dir.
> For one possible solution to this problem, search MSDN for "delexe" (and
> possibly "Jeffrey Richter"). This technique should remove all programs and
> the dir. itself.
> There might be some snippets at http://www.codeproject.com,
> http://codeguru.earthweb.com or http://www.codepile.com also.
>
> /Mike
>
>
>



This archive was generated by hypermail 2b25 : Mon Feb 26 2001 - 19:07:30 CST