hta

Password notification script raising “type mismatch” error for remaining number of days

点点圈 提交于 2019-12-30 13:32:17
问题 I can get each one to work by themselves but I can not get them to work together, the logon script uses the strArg = to call on the HTA file, the HTA file generates a password window. When the logon script runs the HTA file errors out on lines 31 and 106. I know the issue lies within the strArg , I can not figure it out. It should be notifying endusers at the 13 days before expiring mark. Any help would be great. Currently, as the script is now, I get an error with the HTA file part: Line: 31

Password notification script raising “type mismatch” error for remaining number of days

梦想与她 提交于 2019-12-30 13:31:43
问题 I can get each one to work by themselves but I can not get them to work together, the logon script uses the strArg = to call on the HTA file, the HTA file generates a password window. When the logon script runs the HTA file errors out on lines 31 and 106. I know the issue lies within the strArg , I can not figure it out. It should be notifying endusers at the 13 days before expiring mark. Any help would be great. Currently, as the script is now, I get an error with the HTA file part: Line: 31

Pass Credentials to WMI Call in VBScript

帅比萌擦擦* 提交于 2019-12-30 09:04:27
问题 I have VBScript inside a HTA getting the ping status from a local WMI call.. I also have a function to get the last reboot time of the remote pc.. Function GetReboot(strComputer) Set objWMIService = GetObject _ ("winmgmts:\\" & strComputer & "\root\cimv2") Set colOperatingSystems = objWMIService.ExecQuery _ ("Select * from Win32_OperatingSystem") For Each objOS in colOperatingSystems dtmBootup = objOS.LastBootUpTime dtmLastBootupTime = WMIDateStringToDate(dtmBootup) dtmSystemUptime = DateDiff

HTA's; use other browser to host?

霸气de小男生 提交于 2019-12-30 08:31:49
问题 If Microsoft's method for using IE as a local host for HTA's then, can I use any other browser instead? 回答1: You can't. There is a similar Mozilla project named XULRunner, but HTA only works in Internet Explorer - the two technologies aren't compatible. To make this clear: HTA will probably not work in anything that's not IE. Yes, HTA is a browser control in a window, but it also has normal aplication privileges (i.e. filesystem access, registry, arbirary code execution etc.). When running in

Get Output of a PowerShell Script in a HTA

≡放荡痞女 提交于 2019-12-28 15:56:12
问题 I am trying to call a powershell script from HTML Application [HTA] as : Set WshShell = CreateObject("WScript.Shell") Set retVal = WshShell.Exec("powershell.exe C:\PS_Scripts\test.ps1") Where the test.ps1 just has the process count returning return (Get-Process).Count I want to get the output of this powershell script and then store it in a local variable or display on HTA. How can this be done ? I tried using : retVal.StdIn.Close() result = retVal.StdOut.ReadAll() alert(result) But the

How to get IE9 standards support for dialogs opened by HTA?

不打扰是莪最后的温柔 提交于 2019-12-28 03:14:09
问题 I'm translating some of my old HTAs from Quirks to IE9 standards. However, it seems that modal and modeless dialogs opened by HTA don't support IE9 standards mode. Test dialog: <!DOCTYPE html> <html> <head> <title>TestDialog</title> <meta http-equiv="x-ua-compatible" content="ie=9" /> </head> <body> <svg> <circle cx="100" cy="100" r="50" fill="#0f0" /> </svg> </body> </html> In the HTA main page: <button onclick="showModalDialog(...)">Modal</button> <button onclick="showModelessDialog(...)"

Writing data to a local text file with javascript

China☆狼群 提交于 2019-12-28 02:45:09
问题 I have created a procedure to write content to a text file in my local machine. <form id="addnew"> <input type="text" class="id"> <input type="text" class="content"> <input type="submit" value="Add"> </form> <script> jQuery(function($) { $('#form_addjts').submit(function(){ writeToFile({ id: $(this).find('.id').val(), content: $(this).find('.content').val() }); return false; }); function writeToFile(data){ var fso = new ActiveXObject("Scripting.FileSystemObject"); var fh = fso.OpenTextFile("D

Toggle hide/show table td in .hta

强颜欢笑 提交于 2019-12-25 18:59:12
问题 I've seen several of posts regarding this subject, but I have not managed to solve my own problem despite of having tried different methods. I am programming in a .hta file, where I have all my notes titles listed above each other. Whenever you click a note title the description should appear (toggle/expand) under the title. All the notes should start hidden. sub searchdata SQL_query = "SELECT * FROM dvd WHERE Title LIKE '%"& txtsrch.value &"%' OR Notes LIKE '%"& txtsrch.value &"%' ORDER BY

jQuery die() does not work

折月煮酒 提交于 2019-12-25 06:50:12
问题 Since I'm creating a HTA code I'm stuck with IE :( We needed to trap the change event in a <select> element, but guess what, IE does not support that event. So I created a way to mimic it. With a <input type="text"> that when it is being click show the <select> just below. That part works fine. The problem is, I want to hide the select when the user click outside the select . I tried to catch a click on the body , it works fine the first time but the second time the select gets hidden try

Calling AppActivate on a word 2007 window in Windows 7 gives it focus but doesn't bring it to top of stack

半腔热情 提交于 2019-12-25 02:25:44
问题 I'm trying to manipulate Word from an HTA file application. Currently, when I open word, it opens underneath my application. I'd like to open it on top. I've tried using the following JScript to give Word the focus: wshShell = new ActiveXObject("WScript.Shell"); wshShell.AppActivate(doc.windows.Item(1).caption); This works, and word gets focus, but on Windows 7 it stays underneath my app. Is there something else I need to do to bring word to the top? 回答1: If you can't force that window to the