hta

obfuscating batch+HTA hybrid script

霸气de小男生 提交于 2020-01-11 07:26:07
问题 Following is the hybrid batch script: <!-- :: Batch section @echo off setlocal echo Select an option: for /F "delims=" %%a in ('mshta.exe "%~F0"') do set "HTAreply=%%a" echo End of HTA window, reply: "%{HTAreply}%" pause goto :EOF --> <HTML> <HEAD> <HTA:APPLICATION SCROLL="no" SYSMENU="no" > <TITLE>HTA Buttons</TITLE> <SCRIPT language="JavaScript"> window.resizeTo(374,100); function closeHTA(reply){ var fso = new ActiveXObject("Scripting.FileSystemObject"); fso.GetStandardStream(1).WriteLine

remove button and use dropdown box in hta-vbscript

喜夏-厌秋 提交于 2020-01-06 14:53:49
问题 I am fairly new to hta & vbscript . I have a **hta** script downloaded from internet to delay reboot of computer. There are button for delay such as 30 min, 45 min, 60 min etc. I would like to use combobox(Dropdown box) instead of button. I also want my vbscript will work with dropdown box. Below are the code of hta. <html> <head> <title>Reboot Notification</title> <hta:application id="oMyApp" applicationname="Reboot Notification" border="dialog" BORDERSTYLE="normal" caption="yes" scroll="no"

How to cause button click event when enter is pressed in an hta application

北城以北 提交于 2020-01-06 08:24:12
问题 I have a script that allows me to hide a folder on my pc (using batch file). I've just implemented an hta application to it for the password so It's more seccure. Now the problem I'm having is that if I want to press enter to submit the form on the hta application, it just clears the password field and does nothing. I would like it to have the same effect as if I were to push the OK button. This is the hta part of my batch file: :HTA <html> <head> <title>Password Entry</title> <hta

Ping error return always equals 0

梦想与她 提交于 2020-01-04 05:18:05
问题 Having trouble getting this code to work. I can run the script (with changes) in vbscript and it runs fine. But I cant get this version to return a ping error return value other than 0. Any help is appreciated. This is scanning a list of remote machines with checkboxes and returning the checked values. I want to run the ping to verify the remote machine are there before continuing. But with a error return of 0 for all queries its useless. function statuschk3(){ var checkedValue = null; var

Code Error 800A01A8 - Object Required

陌路散爱 提交于 2020-01-03 05:16:08
问题 I have a HTA file that open a text box alows user to enter path to a folder then save it to a text file. But when I trying to use second button to run a batch, it gives me an error code Code Error 800A01A8 - Object Required : Wscript <html> <head> <title>Files Sync </title> <HTA:APPLICATION APPLICATIONNAME="Files Sync" ID="RY" VERSION="1.0"/> </head> <script language="vbscript"> Sub WriteTxt_OnClick() Dim fso, txt Set fso = CreateObject("Scripting.FileSystemObject") Set txt = fso

IFrame event executes fine in HTML but not in HTA

牧云@^-^@ 提交于 2020-01-02 16:19:26
问题 This HTML file shows message dialog when button inside iframe is clicked: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <script language="VBScript" type="text/vbscript"> Sub load_me() frame.document.write "<input type='button' onclick='parent.message()'>" End Sub Sub message() MsgBox "Hi" End Sub </script> </head> <body> <iframe id="frame" onload="load_me"></iframe> </body> </html> While same document as HTA file, raises error: Error: Object doesn't support

Is it possible to send HTAREPLY with javascript without window.close()

旧巷老猫 提交于 2020-01-02 12:26:29
问题 I am building an HTA/Batch script that includes an interface for a user to send an htareply to the batch script that will send a link to a server to execute a build script on Jenkins. Everything works great but I was wondering if I can leave the hta window open so the user can select another option if required. Any ideas? I attempted to remove the window.close() from the javascript but then it does not send the htareply to the batch script. <!-- :: Batch section @echo off setlocal echo Select

Is it possible to send HTAREPLY with javascript without window.close()

折月煮酒 提交于 2020-01-02 12:26:05
问题 I am building an HTA/Batch script that includes an interface for a user to send an htareply to the batch script that will send a link to a server to execute a build script on Jenkins. Everything works great but I was wondering if I can leave the hta window open so the user can select another option if required. Any ideas? I attempted to remove the window.close() from the javascript but then it does not send the htareply to the batch script. <!-- :: Batch section @echo off setlocal echo Select

Is it possible to use registration-free COM with HTA applications?

半世苍凉 提交于 2020-01-02 05:27:10
问题 Since HTA applications are hosted within MSHTA.exe how does one provide a manifest? Plus I assume providing a MSHTA.exe.manifest could potentially break other HTA apps? 回答1: On Vista+, MSHTA.exe has an embedded manifest, which takes priority over external manifests, so your suggestion is not an option. On XP/2003, yes, your suggestion would work, although it would be bad form, as is dropping files in System32 to modify the behavior of a system binary (especially make sure that any

change HTA application window size

孤者浪人 提交于 2020-01-01 11:32:51
问题 is there any way to change the size of an HTA application? thanks 回答1: <script type="text/javascript"> window.resizeTo(300,290); </script> 回答2: Javascript and VBScript ways to size the HTA on loading, to 1/4 the screen area (half the height, half the width) and center it - using screen.availWidth and screen.availHeight : <SCRIPT LANGUAGE="javascript"> function Window_onLoad(){ // resize to quarter of screen area, centered window.resizeTo(screen.availWidth/2,screen.availHeight/2); window