Beta.7 UX uninstaller fails to clean up all files Topic is solved

Report problems with documented functionality
TAC109
Posts: 1111
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Beta.7 UX uninstaller fails to clean up all files

Post by TAC109 » 04 Aug 2022, 22:36

Beta.7 uninstaller leaves behind:
  • v2.0-beta.7\AutoHotkey.exe (symlink)
  • v1.1.34.03\AutoHotkey.chw
Cheers
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

Re: Beta.7 UX uninstaller fails to clean up all files

Post by lexikos » 04 Aug 2022, 22:44

Where did the chw file come from? The uninstaller is designed to remove files that were installed, and only those files.

TAC109
Posts: 1111
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Beta.7 UX uninstaller fails to clean up all files  Topic is solved

Post by TAC109 » 04 Aug 2022, 23:29

I’m not sure. I had assumed that it was generated by the help system, but I tested just now and it didn’t reappear.

Disregard this one for now. :!:

Cheers
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

Re: Beta.7 UX uninstaller fails to clean up all files

Post by lexikos » 05 Aug 2022, 17:23

A chw file is not deleted by the v1 uninstaller either. If the help system was prone to creating this file, in many cases it would be unable to do so because it doesn't have write access to the installation directory.

A chw file is apparently "a Compiled Help Index file" which is "created when multiple Compiled HTML Help (. CHM) files are merged together". We're not doing that, and the current documentation doesn't even use the standard index or search functions.

TAC109
Posts: 1111
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Beta.7 UX uninstaller fails to clean up all files

Post by TAC109 » 05 Aug 2022, 22:34

From away back Ahk2Exe has used the following code to display the help file, starting at a particular topic (Name):

Code: Select all

VarSetCapacity(ak, ak_size := 8+5*A_PtrSize+4, 0) ; HH_AKLINK struct
NumPut(ak_size, ak, 0, "UInt")
NumPut(&Name, ak, 8)
DllCall("hhctrl.ocx\HtmlHelp", "ptr", GuiHwnd, "str", HelpFile, "uint"
, 0x000D, "ptr", &ak) ; 0x000D: HH_KEYWORD_LOOKUP
It appears that HtmlHelp tries to create a .chw file, and succeeds when in a user level testing environment, but fails to do so under 'Program Files' (this is expected).

Recently I enhanced the help system so that it finds the most recent installed help file for an AHK version. I expect that, when testing these changes I somehow allowed the .chw file to be created under the 'Program Files\AutoHotkey' directories.

Cheers
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

Re: Beta.7 UX uninstaller fails to clean up all files

Post by lexikos » 05 Aug 2022, 22:59

Another way to open the topic corresponding to an index entry is to use search.htm (also usable with the online docs):

Code: Select all

Run hh.exe "ms-its:C:\Program Files\AutoHotkey\AutoHotkey.chm::/docs/search.htm#q=Ahk2Exe"
(It appears Ragnar implemented this in 2017.)

I think the installation scripts directly Run the dash or compiler after installation, which would generally cause them to run as administrator. Of course, non-admin installations would be writable by default.

Post Reply

Return to “Bug Reports”