[CrackMonkey] unlink() comes to Windows. Fear.

Aaron Lehmann aaronl at vitelus.com
Mon Feb 26 19:45:28 PST 2001


----- Forwarded message from Jesper <gakko at sleepy.dk> -----

From: "Jesper" <gakko at sleepy.dk>
Date: Tue, 27 Feb 2001 02:06:59 +0100
To: "AbiWord-dev" <abiword-dev at abisource.com>
Subject: RE: Location of Windows uninstaller?
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)

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 at abisource.com
> [mailto:owner-abiword-dev at 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
>
>
>




----- End forwarded message -----





More information about the Crackmonkey mailing list