Improving HTA on Windows

199 views
Skip to first unread message

TonyM

unread,
Feb 25, 2020, 8:08:42 PM2/25/20
to TiddlyWiki
Folks,

Saving a TiddlyWiki as a HTA file on windows machines allows immediate access in its own window with saving automatic.

This is a quick path to adoption, as a result I would like to explore it further to support ease of adoption and its use one the local computer.

HTA files activate the  mshta.exe application found in C:\Windows\SysWOW64 this is sometimes a vector for malware but if your computer is secure you should be fine.
  • Is this mshta.exe on a fresh install of Windows 10 (Without IE) or with the new edge browser?
  • Application links want to download which reduces desktop interaction (Unlike the same in TiddlyDesktop), can we fix this?
  • A Windows shortcut allows you to open the HTA maximised or minimised as well.
  • The HTA application is visible in the running apps of task manager and lists the open instances. I wonder if we could use this to create a launch script that will not load the same hts file more than once?, to stop on overwitiing the other.
  • Could we introduce a user ID or lock method so these can be placed on a LAN drive and force serial editing, if so it would become a tool for teams?
your thoughts or insight please
Tony

Stobot

unread,
Feb 25, 2020, 8:44:52 PM2/25/20
to TiddlyWiki
I'm not technical enough to answer all of your questions, but:
  • I love the HTA option, and have used it extensively - very easy I agree, and looks the most "program like"
  • My understanding (and from my experience) it's part of all modern full Windows versions, and will be for a while. It's used by some Windows admins to build scripting utilities (though Microsoft probably wants to push them from VBScript into PowerShell).
  • I don't know the answers to most of your other questions unfortunately
As my background is all Microsoft (VB etc.), I've often thought of building very similar to TiddlyWiki using HTA and a SQL Server / Access back-end, as that would finally get me to the large-scale and multi-user nirvana I've craved TiddlyWiki to morph into. Someday...
Message has been deleted

Scott Kingery

unread,
Feb 26, 2020, 8:05:44 PM2/26/20
to TiddlyWiki
Looking at the Microsoft Documentation, it looks like they were locked as of 2013.

It seems to still work though. I could see a use case and it isn't terrible because if in Windows Next they decide to completely kill it off you could rename the file back to .html and figure out where to go from there.

bimlas

unread,
Feb 27, 2020, 2:26:23 AM2/27/20
to TiddlyWiki
TonyM,

It is only partially related to the topic: HTA hack only works on Windows and is not recommended to use (legacy). TiddlyDesktop uses NW.js (https://nwjs.io/), which can be used as a minimal browser. Although I haven't been able to configure it to let the wiki save the changes automatically (overwrite the HTML by self), but I can open the files with it. The command is:

nw --url="file:///absolute/path/of/tiddlywiki.html"

We could associate the HTA files with NW.js, so this could be a cross-platform solution.
Message has been deleted

TonyM

unread,
Feb 27, 2020, 5:49:38 AM2/27/20
to TiddlyWiki
All,

I do use TiddlyDesktop in preference to hta's, for desktop interaction, however I want an easy instruction setup for users.

The node versions, and twexe open the server in a Window and the wiki in a browser. This is unkind and confusing to end users, why do they need two windows? That is the beauty of the HTA format. I may add, for simple notepad features hta is more than adequate. 

I would prefer to associate .tw files with NW

The fact is I do care, It would be nice for user to not have to care however. If we made our own exe installable equivalent of the mshtml helper that used chromium (?) and made .tw files behave like hta files on every platform would we have nervana?

If tiddlywiki could be treated like a word document download and double click but they open in their own window and save (not in a browser, shared app or with a server running) they will be more intuitive to use.

Regards
Tony

On Thursday, February 27, 2020 at 6:58:21 PM UTC+11, TiddlyTweeter wrote:
bimlas

We could associate the HTA files with NW.js, so this could be a cross-platform solution.

Useful comment!

nw --url="file:///absolute/path/of/tiddlywiki.html"

Right. TiddlyDesktop doesn't support yet, as far as I can see, relative addressing. Which makes "wrapped install" of TD with wiki not possible at the moment.
TD is particularly good for its MENU environment, ideal for sets of wikis. Even more than the .hta approach it looks like an app and can be treated as one.

Thoughts
TT
Message has been deleted

TonyM

unread,
Feb 29, 2020, 5:51:30 AM2/29/20
to TiddlyWiki
TT,

Associations can be set with a reg file containing a single registry entry. These can be saved to disk from a wiki, and launched. There would be ones for other platforms.

Regards
Tony


On Saturday, February 29, 2020 at 9:18:00 PM UTC+11, TiddlyTweeter wrote:
TonyM wrote

I do use TiddlyDesktop in preference to hta's, for desktop interaction, however I want an easy instruction setup for users.

 Right. If the addressing of wiki in it could be relative pathing you'd be able to do a nice install as a package.

FYI, there are aspects of TD that, as far as I can see, none of us have explored yet. For instance restyling the menus. IMO it has unexplored potential for desktops.

The node versions, and twexe open the server in a Window and the wiki in a browser. This is unkind and confusing to end users, why do they need two windows? That is the beauty of the HTA format. I may add, for simple notepad features hta is more than adequate. 

I would prefer to associate .tw files with NW

Doable. For launch from file explorer in windows you'd need a registry changes?

Making installers doesn't look too difficult. An issue would be "signing" if you want :..
 
... for user to not have to care however.

 
If we made our own exe installable equivalent of the mshtml helper that used chromium (?) and made .tw files behave like hta files on every platform would we have nervana?

Dream on :). IF. You prob right for Windows but what about smart phones? Nirvana is elusive. Most gurus say its not easy. Maybe its because they have a vested interest in that, but also looks truish.  But I wonder what COMMON all platform solution would be other than a Web page?
 
If tiddlywiki could be treated like a word document download and double click but they open in their own window and save (not in a browser, shared app or with a server running) they will be more intuitive to use.

I think this is about ASSOCIATION? Right? You'd need to change WINDOWS registry to change that behavior? Then you'd need the app present for it.

Best wishes
TT
Message has been deleted

TonyM

unread,
Feb 29, 2020, 7:44:30 PM2/29/20
to TiddlyWiki
See
"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\

Mine looks like this Attached
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.tw]

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.tw\OpenWithList]
"a"="{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\\OpenWith.exe"
"b"="bdca"
"c"="firefox.exe"
"d"="chrome.exe"
"MRUList"="dcabe"
"e"="nw.exe"


[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.tw\OpenWithProgids]
"tw_auto_file"=hex(0):


[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.tw\UserChoice]
"Hash"="bRMttY1jsOw="
"ProgId"="Applications\\firefox.exe"

If you save the reg file locally, Open regedit with run as administrator, then you can import it or even just double click it.

From explorer open with... on a .tw file and you can set the association manually. 

There are batch ways to do this.

Regards
Tony

On Saturday, February 29, 2020 at 10:09:23 PM UTC+11, TiddlyTweeter wrote:
TonyM wrote:
Associations can be set with a reg file containing a single registry entry. These can be saved to disk from a wiki, and launched. There would be ones for other platforms.

 What would the reg entry be for ".tw" on Windows be? I could test with Polly.

TT
TWFileExt.reg
Reply all
Reply to author
Forward
Message has been deleted
0 new messages