Configure your task to execute program C:\Windows\System32\mshta.exe. In the arguments field enter the full path to the hta file. If you've got some kind of 32 bit requirement, then use the SysWOW64 version.
You should only do that if you've set the task to "run only when the user is logged on". That way the GUI window will be visible to you on the desktop.
If you need it to run unattended, "Run whether user is logged on or not", then you should convert the code to VB script or Powershell so that you can use a command line program (like cscript.exe) to run it.
The issue is that GUI programs tend to display message boxes and in unattended mode, you have no visibility to the window and thus no way to "click ok to continue".