Eu fiz algo semelhante antes com a exibição de mensagens de HTA no Windows computadores com um script em lote, por isso resolvi partilhar o meu exemplo consigo e pode ajustar as suas necessidades caso isso ajude com o seu problema.
Essentially this builds a dynamic HTA file and then executes it with wscript
Exemplo de script em lote
O título do HTA e as três linhas do corpo são variáveis configuradas em cima neste exemplo de script em lote. O cronômetro é usado pelo número de segundos antes que a mensagem seja fechada automaticamente.
Você deve ser capaz de usar essa lógica como ponto de partida e ajustar de acordo com as suas necessidades. Você pode colocar sua lógica de arquivo HTA no lote, copiá-lo e, em seguida, chamar ou o que eu suponho.
IF NOT DEFINED MINIMIZED SET MINIMIZED=1 && START "" /MIN "%~dpnx0" %* && EXIT
@ECHO OFF
SET MsgTitle=Hey! Here is a Title!
SET MsgLine1=Hey! Here is a message!
SET MsgLine2=Message Line Two.
SET MsgLine3=Message Line Three.
::: -- Set the number in seconds you want the window to close
SET CloseTimer=5
SET TmpHTAFile=%tmp%\tmp.hta
SET TmpVBSFile=%tmp%\tmp.vbs
IF EXIST "%TmpHTAFile%" DEL /Q /F "%TmpHTAFile%"
IF EXIST "%TmpVBSFile%" DEL /Q /F "%TmpVBSFile%"
ECHO ^<html^> >> "%TmpHTAFile%"
ECHO ^<head^> >> "%TmpHTAFile%"
ECHO ^<hta:application >> "%TmpHTAFile%"
ECHO APPLICATIONNAME = "Message Alert" >> "%TmpHTAFile%"
ECHO ID = "Message Alert" >> "%TmpHTAFile%"
ECHO BORDERSTYLE = "Normal" >> "%TmpHTAFile%"
ECHO CAPTION = "No" >> "%TmpHTAFile%"
ECHO CONTEXTMENU = "No" >> "%TmpHTAFile%"
ECHO INNERBORDER = "No" >> "%TmpHTAFile%"
ECHO MAXIMIZEBUTTON = "No" >> "%TmpHTAFile%"
ECHO MINIMIZEBUTTON = "No" >> "%TmpHTAFile%"
ECHO NAVIGABLE = "No" >> "%TmpHTAFile%"
ECHO SCROLL = "No" >> "%TmpHTAFile%"
ECHO SCROLLFLAT = "No" >> "%TmpHTAFile%"
ECHO SELECTION = "No" >> "%TmpHTAFile%"
ECHO SHOWINTASKBAR = "No" >> "%TmpHTAFile%"
ECHO SINGLEINSTANCE = "Yes" >> "%TmpHTAFile%"
ECHO SYSMENU = "No"/^> ^<STYLE^> >> "%TmpHTAFile%"
ECHO html, body { >> "%TmpHTAFile%"
ECHO background color: #000000 >> "%TmpHTAFile%"
ECHO font-size: 90%; >> "%TmpHTAFile%"
ECHO line-height: 2.1em; >> "%TmpHTAFile%"
ECHO margin: 10; >> "%TmpHTAFile%"
ECHO padding: 0; >> "%TmpHTAFile%"
ECHO } >> "%TmpHTAFile%"
ECHO h1 {font-family: Arial; >> "%TmpHTAFile%"
ECHO color: #FF0000; >> "%TmpHTAFile%"
ECHO font-size: 3em; >> "%TmpHTAFile%"
ECHO text-align: center; >> "%TmpHTAFile%"
ECHO } >> "%TmpHTAFile%"
ECHO h2 {font-family: Arial; >> "%TmpHTAFile%"
ECHO color: #ffffff; >> "%TmpHTAFile%"
ECHO font-size: 1.5em; >> "%TmpHTAFile%"
ECHO text-align: left; >> "%TmpHTAFile%"
ECHO } >> "%TmpHTAFile%"
ECHO h3 >> "%TmpHTAFile%"
ECHO {font-family: Arial; >> "%TmpHTAFile%"
ECHO color: #666666; >> "%TmpHTAFile%"
ECHO font-size: 1em; >> "%TmpHTAFile%"
ECHO text-align: center; >> "%TmpHTAFile%"
ECHO } >> "%TmpHTAFile%"
ECHO ^</STYLE^> ^<script type='text/vbscript'^> Sub Window_onload() >> "%TmpHTAFile%"
ECHO me.ResizeTo 500,280 >> "%TmpHTAFile%"
ECHO me.MoveTo Screen.Width /2 - 300,Screen.Height / 2 - 300 >> "%TmpHTAFile%"
ECHO me.SetTimeout "Me.Close()",%CloseTimer%000 >> "%TmpHTAFile%"
ECHO End Sub >> "%TmpHTAFile%"
ECHO ^</script^> >> "%TmpHTAFile%"
ECHO ^</head^> >> "%TmpHTAFile%"
ECHO ^<body scroll="no"^> >> "%TmpHTAFile%"
ECHO ^<br^> >> "%TmpHTAFile%"
ECHO ^<h1^>%MsgTitle%^</h1^> >> "%TmpHTAFile%"
ECHO ^<h2^>%MsgLine1%^<br^> >> "%TmpHTAFile%"
ECHO %MsgLine2%^<br^> >> "%TmpHTAFile%"
ECHO %MsgLine3%^</h2^> >> "%TmpHTAFile%"
ECHO ^<h3^>close in %CloseTimer% seconds^</h3^> >> "%TmpHTAFile%"
ECHO ^<script type="text/javascript"^> >> "%TmpHTAFile%"
ECHO ^</script^> >> "%TmpHTAFile%"
ECHO ^</body^> >> "%TmpHTAFile%"
ECHO ^</html^> >> "%TmpHTAFile%"
ECHO Set objShell = Wscript.CreateObject("Wscript.Shell") >> "%TmpVBSFile%"
ECHO objShell.Run ("%TmpHTAFile%") >> "%TmpVBSFile%"
wscript "%TmpVBSFile%"
DEL /Q /F "%TmpVBSFile%"